@import url('https://fonts.googleapis.com/css2?family=Monda:wght@400..700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');
@import url('variables.css');

body{
    background-color: var(--base-body-color);
    color: var(--base-font-color);
    font-family: var(--base-font-family);
}
a{
    all: unset;
}

h1{
    font-weight: 500;
    line-height: 1.2;
}

.header{
    display: flex;
    height: 50px;
    gap: 50px;
    justify-content: center;
    align-items: center;
    border-bottom: 2px solid var(--block-border-color);
}

.header-logo{
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}
.header-logo-img{
    width: 30px;
    height: 30px;
}

.header-logo-title{
    font-size: 20px;
}

.header-logo-title:hover{
    cursor: pointer;
}

.header-nav{
    font-size: 16px;
}

.header-nav-items{
    display: flex;
    flex-direction: row;
    gap: 10px;

}


.header-nav-item{
    list-style: none;
    white-space: nowrap;
}
.header-nav-item:hover{
    cursor: pointer;
    color: var(--btn-text-hover);
}
.header-nav-item:focus{
    color: var(--btn-text-hover);
}

.header-nav-item:focus-visible{
    outline: 2px solid var(--input-text-borderfocus);
}

.header-nav-item.active{
    border-bottom: 2px solid var(--accent-color);
}

.header-search-input{
    display: flex;
    height: 32px;
    width: 300px;
    min-width: 200px;
    margin-right: auto;
    position: relative;
}
.header-search-loupe{
    width: 15px;
    height: 15px;
    position: absolute;
    left: 91%;
    top: 8px;
}

.base-input{
    cursor:text;
    height: 15px;
    width: 100%;
    align-items: center;
    background-color: var(--input-text-bg);
    border-radius: 12px;
    padding: 6px;
    border: 2px solid var(--input-text-border);
    color: var(--input-text-color);
    font-size: 12px;
}

.base-input.search-input{
        padding-right: 30px;
}


.base-input::placeholder{
    color: var(--input-text-placeholder);
}

.base-input:focus{
border: 1px solid var(--input-text-borderfocus);
outline: none;
}

.header-user-nav{ 
    display: flex;
    justify-content: center;
    gap: 25px;
    width: 200px;
    margin-left: auto;
    padding-right: 35px;
    align-items: center;
    position: relative;
}

.header-user-nav.logged{
    gap: 10px;
}

.header-user-nav.logged:hover .header-profile-dropdown, .header-user-nav.logged:focus-within .header-profile-dropdown{
    opacity: 1;
    transform: translate(0);
    visibility: visible;

}

.header-profile-user{
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.header-profile-avatar{
    width: 35px;
    height: 35px;
    border-radius: 50%;
}

.header-profile-dropdown{
    position: absolute;
    display: flex;
    flex-direction: column;
    gap: 5px;
    top: 100%;
    right: 13%;
    background-color: var(--block-bg-color);
    border: 1px solid var(--block-border-color);
    border-radius: 10px;
    border-top: none;
    z-index: 100;
    min-width: 160px;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    padding-top: 2px;
    padding-bottom: 5px;
    font-size: 14px;
}


.base-btn{
    display: flex;
    justify-content: center;
    align-items: center;
    height: 35px;
    background-color: var(--accent-color);
    padding-left: 10px;
    padding-right: 10px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--base-font-color);
    outline: none;
    border: none;
}

.base-btn:focus-visible{
    outline: 2px solid var(--input-text-borderfocus);
}


.base-btn:hover{
    background-color: var(--btn-hover);
    color: var(--btn-text-hover);
}

.base-btn.button-login{
    background-color: transparent;
}

.default-wrapper{
    display: flex;
    justify-self: center;
    width: 80%;
    flex-direction: column;
}

.auth-form-error{
    color: red;
    align-self: center;
}

.auth-form-block{
    display: flex;
    width: 30%;
    min-width: 300px;
    justify-self: center;
    align-self: center;
    flex-direction: column;
    border: 2px solid var(--block-border-color);
    border-radius: 20px;
    margin-top: 150px;
    min-height: 400px;
    height: auto;
    background-color: var(--block-bg-color);
}

.auth-form-title{
    align-self: center;
}

.auth-form{
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-form-login, .auth-form-password{
display: flex;
flex-direction: column;
gap: 5px;
}

.auth-form-label{
font-size: 14px;
width: 73%;
align-self: center;
}

.base-input.login, .base-input.password{
    width: 70%;
    align-self: center;
    height: 25px;
}

.base-btn.login{
    width: 30%;
    align-self: center;
    height: 40px;
    margin-bottom: 50px;
}

.base-btn.passw{
    width: 50%;
    align-self: center;
    height: 40px;
    margin-bottom: 50px;
    margin-top: 25px;
}

a.forgot-password{
    color: var(--accent-color);
    cursor: pointer;
    align-self: end;
    padding-right: 60px;
    font-size: 14px;
}

a.forgot-password:hover{
    color: var(--btn-hover);
}

.auth-form-caption{
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    margin-top: auto;
    padding-bottom: 20px;
}

.auth-form-sign{
    padding: 0;
    margin: 0;
    font-size: 14px;
}

a.auth-form-sign{
    color: var(--accent-color);
    cursor: pointer;
}
a.auth-form-sign:hover{
    color: var(--btn-hover);
}

.profile-block{
    display: flex;
    flex-direction: column;
    background-color: var(--block-bg-color);
    border: 1px solid var(--block-border-color);
    border-radius: 10px;
    margin-top: 70px;
    min-height: 500px;
    height: auto;
}

.profile-block-title{
    margin-left: 50px;
}
.profile-block-user{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin-top: 50px;
    padding-left: 50px;
    padding-right: 50px;
}

.profile-user-info{
    display: flex;
    gap: 30px;
    flex-direction: row;
}

.profile-user-avatar{
    width: 160px;
    height: 160px;
    border-radius: 50%;
}

.profile-user-login{
    font-size: 28px;
    align-self: flex-start;
    margin: 0;
}

.base-btn.edit-profile{
    align-self: flex-start;
    height: 40px;
    width: auto;
}

.profile-block.edit{
    width: 70%;
    min-width: 680px;
    align-self: center;
}

.profile-block-title.edit{
    color: var(--base-font-color);
    display: flex;
    align-items: center;
}

.back-link{
    width: 20px;
    cursor: pointer;
    display: flex;
}

.back-link:hover{
    color: var(--btn-text-hover);
}

.back-link:focus-visible{
    color: var(--btn-text-hover);
    outline: 2px solid var(--input-text-borderfocus);
}

.editprofile-block-avatar{
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 200px;
    min-height: 100%;
    border: 1px solid var(--block-border-color);
    border-radius: 10px;
    padding: 20px;
}

.editprofile-block{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    padding-left: 30px;
    padding-right: 30px;
}

.editprofile-block-form{
    display: flex;
    margin-right: auto;
    min-width: 300px;
    width: 100%;
    border: 1px solid var(--block-border-color);
    border-radius: 10px;
    padding: 30px;
}

.auth-form.edit{
    width: 100%;
}

.base-btn.saveedit{
    width: 150px;
    margin-top: 23px;
    align-self: center;
}

.base-btn.editavatar{
    background-color: transparent;
    width: 150px;
    margin-top: 23px;
    align-self: center;
    border: 2px solid var(--block-border-color);
    font-size: 12px;
}

.base-btn.editavatar:hover{
    background-color: var(--input-text-bg);
}

.editavatar-hint{
    font-size: 10px;
    color: var(--input-text-color);
    text-align: center;
}

.hero-block{
    display: flex;
    flex-direction: column;
    margin-top: 70px;
    background-image: url(/images/heroimage.webp);
    background-repeat: no-repeat;
    background-size: 650px 600px;
    background-position: right top;
    min-height: 600px;
}
.hero-text{
width: 40%;
display: flex;
flex-direction: column;
}
.hero-subtitle{
    margin-top: 0;
}

.hero-image-block{
    width: 50%;
    height: 50%;
}

.hero-image{
    width: 650px;
    height: 600px;
}
.index-buttons{
    display: flex;
    gap: 20px;
    margin-top: 30px;
}
.base-btn.create-room{
    height: 40px;
    border-radius: 6px;
}
.base-btn.how-work{
    border-radius: 6px;
    height: 40px;
    background-color: transparent;
    border: 2px solid var(--block-border-color);
}
.base-btn.how-work:hover{
    background-color: var(--input-text-bg);
}

.hero-cards{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
    margin-top: 170px;
    max-width: 70%;
}

.hero-card{
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 3;
    border-right: 1px solid var(--block-border-color);
    padding-top: 16px;
    padding-bottom: 16px;
    max-width: 300px;
}
.hero-card:last-child{
    border: none;
}


.hero-card-description{
    color: var(--input-text-color);
    margin: 0;
}
.hero-card-title{
    margin: 0;
}
.hero-card-icon{
    width: 64px;
    height: 64px;
}