@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800&family=Roboto:ital,wght@0,300;0,500;0,700;1,100&display=swap');
*{
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
}

:root {
    --blue: #007bff;
    --indigo: #6610f2;
    --purple: #6f42c1;
    --pink: #e83e8c;
    --red: #dc3545;
    --orange: #fd7e14;
    --yellow: #ffc107;
    --green: #28a745;
    --teal: #20c997;
    --cyan: #17a2b8;
    --white: #fff;
    --gray: #6c757d;
    --gray-dark: #343a40;
    --primary: #007bff;
    --secondary: #6c757d;
    --success: #28a745;
    --info: #17a2b8;
    --warning: #ffc107;
    --danger: #dc3545;
    --light: #f8f9fa;
    --dark: #343a40;
    --black: #000000;
    --transparent: #000000d8;
}

.banner{
    position: absolute;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    background-color: var(--white);
}

.wrapper{
    width: 80%;
    padding: 4rem;
    margin-top: -8rem;
    animation: fade 3000ms forwards;
}

@keyframes fade {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.wrapper h1{
    font-size: 4rem;
    margin-left: 1rem;
}

.wrapper button{
    margin-left: 1rem;
    padding: 0.5rem 1.5rem;
    background-color: var(--black);
    border: none;
    color: var(--white);
    cursor: pointer;
    border: 2px solid var(--black);
}

.wrapper button:hover{
    background-color: var(--white);
    border: 2px solid var(--black);
    color: var(--black);
    font-weight: 700;
}

main{
    width: 100%;
}

header{
    width: 100%;
    padding: 1rem 2rem;
    background-color: var(--black);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

header img{
    width: 40px;
    height: 40px;
}

header h1{
    color: var(--white);
    font-weight: 400;
}

.right-side-header{
    display: flex;
   padding: 0.5rem;
   width: 50%;
}

.search{
    padding: 0.5rem 0.9rem;
    outline: none;
    width: 100%;
    border-radius: 1rem;
    border: none;
}

.contact{
    display: flex;
    margin: auto;
}

.contact h5{
    margin: 0 0.5rem;
    font-weight: 200;
}

.contact-list{
    height: 80vh;
    margin: 0 auto;
    overflow: scroll;
    display: flex;
    flex-direction: column;
    padding: 2rem 4rem;
}

.contact-item{
    display: flex;
    place-items: center;    
    padding: 0.5rem;
    margin-bottom: 0.5rem;
}

.contact-photo{
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
}

.contact-info{
    margin: 0 1rem;
}

.contact-info h5{
    color: var(--black);
}
.contact-info h6{
    font-weight: 400;
    color: var(--dark);
}

.contact-action{
    padding: 1rem;
    margin-left: auto;
    display: flex;
    position: relative;
    cursor: pointer;
}

.contact-action:hover .contact-action-menu{
    display: block;
}

.contact-action-menu{
    width: 150px;
    position: absolute;
    padding: 1rem;
    background-color: white;
    top: 2.5rem;
    right: 0;
    box-shadow: 0 2px 3px 0 rgba(60,64,67,.3),0 6px 10px 4px rgba(60,64,67,.15);
    z-index: 1;
    display: none;
}

.contact-action-menu i{
    margin-right: 0.1rem;
}

.add-contact-btn{
    width: 55px;
    height: 55px;
    background-color: var(--black);
    box-shadow: 0 2px 3px 0 rgba(60,64,67,.3),0 6px 10px 4px rgba(60,64,67,.15);
    position: absolute;
    bottom: 20px;
    right: 3rem;
    font-size: 2rem;
    border-radius: 50%;
    color: white;
    border: none;
    cursor: pointer;
    z-index: 1;
}

.add-contact-btn:hover{
    background-color: var(--teal);
}

.hidden{
    display: none !important;
}

.popup-banner{
    width: 100%;
    height: 100vh;
    position: absolute;
    background-color: var(--white);
    z-index: 5;
}

.popup-form{
    width: 65%;
    margin: 0 auto;
    height: 100vh;
    display: flex;
    flex-direction: column;
    place-items: center;
}

.cancel-form{
    width: 100%;
    padding: 1rem;
    text-align: right;
    font-size: 2rem;
    color: var(--black);
    cursor: pointer;
}

.form-group{
    padding: 0.1rem;
    margin: 0.4rem 0;
}

.form-group img{
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
}

.form-group input{
    border: none;
    border-bottom: 1px solid var(--gray);
    padding: 0.5rem;
    width: 100%;
    outline: none;
}

.upload-photo {
    position: relative;
    width: 4rem;
    height: 4rem;
    background: #c2e7ff;
    display: flex;
    border-radius: 50%;
    margin-top: -3rem;
    margin-bottom: 2rem;
  }
  
  .upload-photo i {
    cursor: pointer;
    margin: auto;
    font-size: 1.5rem;
  }
  
  .upload-photo input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
  }
  
  .upload-photo:hover input[type="file"],
  .upload-photo:focus input[type="file"] {
    outline: none;
  }

.contact-form{
    padding: 1rem;
    width: 100%;
}

li{
    list-style-type: none;
    padding: 0.1rem 0px;
}

textarea{
    width: 100%;
    outline: none;
    border: none;
    padding: 0.7rem;
    border-bottom: 1px solid var(--gray);
 }

.save-btn{
    width: 100%;
    padding: 0.7rem 4rem;
    background-color: var(--black);
    border: none;
    color: var(--white);
    cursor: pointer;
    border: 1px solid var(--black);
    margin-top: 1rem;
    border-radius: 1rem;
}

.wrongNumber{
    outline: 1px solid var(--danger) !important;
}

@media only screen and (min-width: 426px) and (max-width: 767px){
    .mobile-btn{
        display: none;
    }

    .contact{
        display: none;
    }
   
    header{
        width: 100%;
        padding: 1rem 2rem;
        flex-direction: column;
    }
    .left-side-header{
        width: 100%;
        display: flex;
        align-items: center;
    }

    .right-side-header{
        width: 100%;
        padding: 5px 0px;
        display: flex;
    }

    .right-side-header input{
        width: 100%;
    }
    header h1{
        font-size: large;
        padding-left: 0.4rem;

    }

    section{
        padding: 2rem 1rem;
    }

    .popup-form{
        width: 90%;
    }

}

@media only screen and (max-width: 425px){

    .banner{
        justify-content: flex-start;
    }

    .wrapper {
        width: 100%;
    }
    .wrapper h1{
        font-size: 2rem;
    }

    header{
        width: 100%;
        padding: 1rem 2rem;
        flex-direction: column;
    }

    .left-side-header{
        width: 100%;
        display: flex;
        align-items: center;
    }

    .right-side-header{
        width: 100%;
        padding: 5px 0px;
        display: flex;
    }

    .right-side-header input{
        width: 100%;
    }

    header h1{
        font-size: large;
        padding-left: 0.4rem;

    }

    .popup-form{
        width: 100%;
    }

    .contact-list{
        padding: 1rem 1rem;
        height: 70vh;
    }

    .form-group{
        width: 100%;
    }
    
}