@import url("header.css");
@import url("footer.css");
@import url("variables.css");
@import url("fonts.css");

* {
    caret-color: var(--index-color);
}

/* теги */
html, body {
    font-family: var(--main-font);
    background-color: var(--index-bg-color);
    margin: 0;
    color: var(--index-color);
    height: max-content;
    min-height: calc(100vh - 94px);
    scrollbar-gutter: stable; 
}
body{
    padding-top: 94px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
main {
    margin: 0 auto;
    width: 90%;
    max-width: 1550px;
    padding: 30px 0;
}
main:has(block) {
    display: flex;
    flex-direction: column;
    main:not(:has(.session-card)){
        gap: 80px;
    }
}
h1 {
    font-style: bold;
    font-size: 25px;
    letter-spacing: 9%;
}
h2 {font-size: 23px;}
p {font-size: 16px; margin-top: 20px; margin-bottom: 10px;}
a:hover:not(header a, a.movie, a.session-card){
    text-decoration: underline; 
    cursor: pointer;
}
button {
    border-radius: var(--elem-radius);
    border: none;
    transition: transform 0.3s ease;
    background-image: var(--elem-gradient);
    font-family: 'Montserrat-bold';
    cursor: pointer;
    color: #000;
}
button:hover {transform: scale(1.02);}
button:active{transform: scale(1.0);}
exceptions {
    width: 100%;
    height: 20px;
    display: none;
    margin: 5px 0 0 0;
    font-size: 13px;
    color: rgb(155, 54, 54);
}
error {
    width: 80%; 
    margin: 5px 0 0 0;
    font-size: 13px;
    color: rgb(155, 54, 54);
    display: flex;
    flex-direction: column;
    gap: 5px;
}
error > div {
    color: #ff4444;     
    padding: 7px; 
    background: rgba(255,68,68,0.1); 
    border-radius: 5px;
}
input, textarea, select {
    font-family: var(--main-font);
    border: none;
    background-color: var(--elem-bg-color);
    border-radius: var(--elem-radius);
}
input{
    height: 41px;
    color-scheme: dark;
}
/* Убираем белый фон при автозаполнении */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px var(--elem-bg-color) inset !important;
    -webkit-text-fill-color: var(--index-color) !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Для Firefox */
input:-moz-autofill {
    box-shadow: 0 0 0 30px var(--elem-bg-color) inset !important;
    color: var(--index-color) !important;
}

/* Для более старых браузеров */
input:autofill {
    box-shadow: 0 0 0 30px var(--elem-bg-color) inset !important;
    color: var(--index-color) !important;
}

/* Дополнительно для всех браузеров */
input:-webkit-autofill::first-line {
    color: var(--index-color) !important;
}

/* полоса прокрутки у textarea */
textarea::-webkit-scrollbar { /* 1. Сама полоса (ширина) */
  width: 5px;
  background-color: transparent;
}
textarea::-webkit-scrollbar-thumb { /* 2. Ползунок */
    border: none;
    background: linear-gradient(
        to bottom, 
        transparent 0%, 
        transparent 15%,
        #5FA944 40%,  
        #96A336 50%,  
        #847926 60%,  
        transparent 85%,
        transparent 100%
    );
}
textarea::-webkit-scrollbar-thumb:hover { /* 3. Эффект при наведении на ползунок */
    cursor: default;
}
textarea::-webkit-scrollbar-track { /* 4. Дорожка, по которой бегает ползунок */
  background: transparent;
}
select {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='512' height='512' viewBox='0 0 284.929 284.929'%3E%3Cpath fill='%23fff' d='m282.082 76.511-14.274-14.273q-2.854-2.858-6.57-2.856-3.708-.002-6.563 2.856L142.466 174.441 30.262 62.241q-2.855-2.858-6.567-2.856-3.713-.002-6.567 2.856L2.856 76.515Q-.001 79.369 0 83.082q0 3.71 2.856 6.565l133.043 133.046q2.854 2.854 6.567 2.854c3.713 0 4.661-.951 6.562-2.854L282.082 89.647c1.902-1.903 2.847-4.093 2.847-6.565 0-2.475-.945-4.665-2.847-6.571'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 40px;
    height: 40px;
    border-radius: 40px;
}

/* классы */
.elem-gradient-bottom { /* НИЖНИЙ ГРАДИЕНТ ЭЛЕМЕНТА */
    position: relative;
    border-radius: var(--elem-radius);
    background: var(--elem-bg-color);
    border: none;
}
.elem-gradient-bottom::after {
    top: var(--elem-top-margin);
    left: 0px;
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: var(--bottom-radius);
    background: var(--elem-gradient);
    z-index: -1;
}

.elem-border-gradient { /* ГРАДИЕНТ ВСЕХ РАМОК */
    border-radius: var(--elem-radius);
    background-color: var(--elem-bg-color);
    border: var(--elem-wihth-border) solid;
    border-image: var(--elem-gradient) 1;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
}
.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.content {
    margin: 0 auto;
    width: 75%;
    padding: 30px 0;
}
/* градиент у форм */
.input-form {
    position: relative;
    display: inline-block;
    color: #FFFFFF;
    border: none;
}
.input-form:not([type="time"], :has(textarea))::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 41px;
    /*градиент */
    background: linear-gradient(45deg, #5FA944, #96A336, #847926);
    z-index: 1;
}
.input-form:has(textarea)::after{
    content: '';
    position: absolute;
    top: 0px;
    left: 0;
    width: 100%;
    height: calc(100% - 1px);
    border-radius: 30px;
    /*градиент */
    background: linear-gradient(45deg, #5FA944, #96A336, #847926);
    z-index: 1;
}
.input-form input, .input-form textarea, .input-form select{
    position: relative;
    z-index: 2;
    outline: none;
    color: white;
    padding-right: 20px;
    /* padding: 0 var(--input-padding-x); */
    padding-left: 20px;
}

@media (max-width: 768px) {
    body{
        margin-top: 137px;
        padding: 0;
    }
}