.ec-event-page {
    max-width: 1245px;
    width: 90%;
    margin: 0 auto;
    color: #313332;
    font-family: "Ony one";
}

.ec-event-page__heading {
    font-size: 30px;
    margin-bottom: 56px;
}

.ec-event-summary {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 32px;
}

.ec-hp-wrap {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.ec-event-summary__image {
    width: 497px;
    height: 324px;
}

.ec-event-summary__title {
    font-size: 24px;
    margin: 0 0 16px;
}

.ec-event-summary__desc {
    font-size: 18px;
    font-weight: 500;
    line-height: 115%;
    color: #4a4a4a;
}

.ec-event-summary__desc p {
    margin: 0 0 10px;
}

.ec-event-page__canceled {
    color: #c0392b;
    font-weight: 600;
    font-size: 16px;
}

.ec-event-page__subheading {
    font-size: 24px;
    text-align: center;
    margin: 48px auto 40px;
}

.ec-register-message {
    margin-bottom: 16px;
    font-size: 14px;
}

.ec-field--categories {
    margin: 16px 0;
}

.ec-register-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.ec-form-row {
    display: grid;
    gap: 32px;
}

.ec-form-row--3 {
    grid-template-columns: repeat(3, 393px);
}

.ec-field label {
    display: block;
    font-size: 18px;
    font-weight: 400;
    color: #313332;
    margin-bottom: 8px;
}

.ec-field input[type="text"],
.ec-field input[type="email"],
.ec-field input[type="tel"] {
    width: 393px;
    height: 52px;
    padding: 15px 20px 16px;
    font-size: 18px;
    line-height: 115%;
    box-sizing: border-box;
    background: #F2F2F2;
    color: #656973;
}

.ec-field input:disabled {
    background: #f2f2f2;
    color: #aaa;
}

.ec-checkbox-inline {
    display: flex !important;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 400;
    color: #313332;
    margin-top: 16px;
    cursor: pointer;
}

.ec-field.ec-consent label {
    width: 600px;
    margin: 0 auto;
}

.ec-field.ec-consent label span {
    font-size: 16px;
}

.ec-checkbox-inline input[type="checkbox"],
.ec-checkbox-inline input[type="radio"]{
    margin: 0;
    height: 24px;
    width: 24px;
    appearance: none;
    background: #F2F2F2;
}

.ec-checkbox-inline input[type="checkbox"]:checked,
.ec-checkbox-inline input[type="radio"]:checked{
    background-color: var(--violet);
    background-image: url(/wp-content/themes/greenshift-child/assets/icons/check.svg);
    background-position: center;
    background-repeat: no-repeat;
}

.ec-field--categories > label {
    margin-bottom: 16px;
}

/* Кастомный выпадающий список дат */

.ec-dropdown {
    position: relative;
}

.ec-dropdown__toggle {
    width: 395px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border: 2px solid #F2F2F2;
    background: #fff;
    font-size: 18px;
    color: #313332;
    cursor: pointer;
    text-align: left;
}

.ec-dropdown.open .ec-dropdown__toggle {
    border-color: #AD83FF;
}

.ec-dropdown__chevron {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    fill: none; 
    stroke: #AD83FF;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .15s;
}

.ec-dropdown.open .ec-dropdown__chevron {
    transform: rotate(180deg);
}

.ec-dropdown__list {
    display: none;
    position: absolute;
    z-index: 20;
    width: 395px;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 2px solid #F2F2F2;
    max-height: 250px; /* ~4 пункта — дальше появляется скролл */
    overflow-y: auto;
}

.ec-dropdown.open .ec-dropdown__list {
    display: block;
}

.ec-dropdown__item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 20px 16px;
    font-size: 18px;
    cursor: pointer;
    color: #313332;
}

.ec-dropdown__item:hover {
    background: #E9DCFF;
    opacity: 0.9;
}

.ec-dropdown__item.disabled {
    color: #313332;
    cursor: not-allowed;
    background: none;
}

.ec-dropdown__item-note {
    font-size: 12px;
    color: #c0392b;
}

.ec-field--categories .ec-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 24px 32px;
    align-items: center;
}

.ec-categories .ec-checkbox-inline {
    margin-top: 4px;
}

.ec-categories__other {
    flex: 1;
    width: 414px;
    height: 51px;
    padding: 15px 20px;
    font-size: 18px;
    box-sizing: border-box;
}

.ec-consent {
    font-size: 18px;
}

.ec-consent a {
    color: #A77FF5;
    font-size: 16px;
}

.ec-submit-btn {
    align-self: flex-start;
    padding: 19.5px 43px;
    background: #422223;
    color: #fff;
    border: none;
    font-size: 18px;
    cursor: pointer;
    margin: 0 auto 56px;
    font-weight: 500;
}

.ec-submit-btn:disabled {
    opacity: .6;
    cursor: default;
}

fieldset {
    border: none;
    font-size: 18px;
}

legend {
    padding-bottom: 16px;
}

@media (max-width: 1200px) {
    .ec-event-summary__image {
        width: 470px;
        height: 306px;
    }
    
    .ec-event-page {
        max-width: 1006px;
    }
    
    .ec-form-row--3 {
        grid-template-columns: repeat(3, 313px);
    }
    
    .ec-dropdown__toggle, .ec-dropdown__list {
        width: 313px;
    }
    
    .ec-field input[type="text"],
    .ec-field input[type="email"],
    .ec-field input[type="tel"] {
        width: 313px;
    }
    
    .ec-categories__other {
        min-width: 407px;
        max-width: 407px;
    }
    
}

@media (max-width: 1040px) {
    .ec-event-summary__image {
        width: 450px;
        height: 286px;
    }
    
    .ec-event-page {
        max-width: 970px;
    }
    
    .ec-form-row--3 {
        grid-template-columns: repeat(3, 280px);
    }
    
    .ec-dropdown__toggle, .ec-dropdown__list {
        width: 280px;
    }
    
    .ec-field input[type="text"],
    .ec-field input[type="email"],
    .ec-field input[type="tel"] {
        width: 280px;
    }
    
    .ec-categories__other {
        min-width: 407px;
        max-width: 407px;
    }
    
}

@media (max-width: 860px) {
    .ec-event-summary {
        flex-direction: column;
    }
    
    .ec-event-page {
        max-width: 635px;
    }
    
    .ec-event-summary__image {
        width: 100%;
        margin: 0 auto;
        max-width: 470px;
        height: auto;
    }
    
    .ec-event-page__subheading {
        margin: 40px auto 32px;
    }
    
    .ec-register-form .ec-form-row--3:nth-of-type(2) {
        grid-template-columns: repeat(3, 207px);
    }
    
    .ec-register-form .ec-form-row--3:nth-of-type(3) {
        grid-template-columns: repeat(2, 315px);
        row-gap: 32px;
    }
    
    .ec-form-row.ec-form-row--3 {
        gap: 8px;
    }
    
    .ec-dropdown__toggle, .ec-dropdown__list {
        width: 638px;
    }
    
    .ec-register-form .ec-form-row--3:nth-of-type(2) .ec-field input[type="text"],
    .ec-register-form .ec-form-row--3:nth-of-type(2) .ec-field input[type="email"],
    .ec-register-form .ec-form-row--3:nth-of-type(2) .ec-field input[type="tel"] {
        width: 207px;
    }
    
    .ec-register-form .ec-form-row--3:nth-of-type(3) .ec-field input[type="text"],
    .ec-register-form .ec-form-row--3:nth-of-type(3) .ec-field input[type="email"],
    .ec-register-form .ec-form-row--3:nth-of-type(3) .ec-field input[type="tel"] {
        width: 315px;
    }
    
    .ec-field--categories .ec-categories {
        flex-direction: column;
        align-content: flex-start;
        align-items: flex-start;
    }
}


@media (max-width: 640px) {
    .ec-event-page__heading {
        margin: 0 0 24px 0;
    }
    
    .ec-event-page__subheading {
        margin: 32px 0;
        text-align: start;
        font-size: 16px;
    }
    
    .ec-register-form .ec-form-row--3:nth-of-type(2) {
        grid-template-columns: repeat(1, 1fr);
        row-gap: 24px;
    }
    
    .ec-register-form .ec-form-row--3:nth-of-type(3) {
        grid-template-columns: repeat(1, 1fr);
        row-gap: 24px;
    }
    
    .ec-register-form .ec-form-row--3:nth-of-type(2) .ec-field input[type="text"],
    .ec-register-form .ec-form-row--3:nth-of-type(2) .ec-field input[type="email"],
    .ec-register-form .ec-form-row--3:nth-of-type(2) .ec-field input[type="tel"] {
        width: 100%;
    }
    
    .ec-categories__other {
        min-width: 100%;
        max-width: 100%;
    }
    
    .ec-field.ec-consent label {
        width: 100%;
        margin: 0 auto;
    }
    
    .ec-field input[type="text"],
    .ec-field input[type="email"],
    .ec-field input[type="tel"] {
       width: 100%;
    }
    
    .ec-register-form .ec-form-row--3:nth-of-type(3) .ec-field input[type="text"],
    .ec-register-form .ec-form-row--3:nth-of-type(3) .ec-field input[type="email"],
    .ec-register-form .ec-form-row--3:nth-of-type(3) .ec-field input[type="tel"] {
        width: 100%;
    }
    
    .ec-dropdown__toggle, .ec-dropdown__list {
        width: 324px;
    }
    
    .ec-event-summary > div {
        display: contents;
    }
    
    .ec-event-summary__title {
        order: -2;
        font-size: 16px;
        margin: 0;
    }
    
    .ec-event-summary__image {
        order: -1;
    }
    
    .ec-event-summary__desc {
        order: 0;
    }
}

@media (max-width: 360px) {
    .ec-register-form .ec-form-row--3:nth-of-type(3) .ec-field input[type="text"],
    .ec-register-form .ec-form-row--3:nth-of-type(3) .ec-field input[type="email"],
    .ec-register-form .ec-form-row--3:nth-of-type(3) .ec-field input[type="tel"] {
        width: 100%;
    }
    
    .ec-dropdown__toggle, .ec-dropdown__list {
        width: 100%;
    }
    
    
}
