.endop-finder,
.endop-gate-layout {
    --endop-green: #009b3a;
    --endop-green-dark: #007c2e;
    --endop-green-soft: #eef9f2;
    --endop-text: #171717;
    --endop-muted: #687076;
    --endop-line: #e4e7e5;
    --endop-danger: #b42318;
    --endop-success: #027a48;
    width: 100%;
    box-sizing: border-box;
    color: var(--endop-text);
}

.endop-finder *,
.endop-gate-layout * {
    box-sizing: border-box;
}

/* School finder */
.endop-finder {
    max-width: 760px;
    margin: 0 auto;
}

.endop-finder__title {
    display: none !important;
}

.endop-finder__panel {
    position: relative;
    max-width: 680px;
    margin: 0 auto;
    padding: 34px;
    overflow: hidden;
    border: 1px solid var(--endop-line);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 18px 55px rgba(23, 23, 23, .08);
}

.endop-finder__accent {
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, var(--endop-green), #21bd5a);
}

.endop-field {
    margin-bottom: 20px;
}

.endop-field[hidden] {
    display: none !important;
}

.endop-field label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: #252525;
    font-size: 15px;
    line-height: 1.2;
    font-weight: 700;
}

.endop-field__step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    border-radius: 50%;
    background: var(--endop-green-soft);
    color: var(--endop-green-dark);
    font-size: 13px;
    font-weight: 800;
}

.endop-select,
.endop-password-row input {
    width: 100%;
    min-height: 54px;
    padding: 0 48px 0 17px;
    border: 1px solid #d8dcda;
    border-radius: 14px;
    background-color: #fff;
    color: #202020;
    font-size: 15px;
    outline: none;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .03);
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.endop-select {
    cursor: pointer;
}

.endop-select:focus,
.endop-password-row input:focus {
    border-color: var(--endop-green);
    box-shadow: 0 0 0 4px rgba(0, 155, 58, .10);
}

.endop-select:disabled {
    cursor: not-allowed;
    color: #959b98;
    background-color: #f6f7f7;
    opacity: 1;
}

.endop-password-block,
.endop-open-block {
    margin-top: 8px;
    padding: 20px;
    border: 1px solid #dceee2;
    border-radius: 16px;
    background: linear-gradient(180deg, #f7fcf9, #fff);
}

.endop-password-block[hidden],
.endop-open-block[hidden] {
    display: none !important;
}

.endop-action-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.endop-action-head__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 12px;
    background: var(--endop-green);
    color: #fff;
    box-shadow: 0 8px 18px rgba(0, 155, 58, .18);
}

.endop-action-head strong,
.endop-action-head span:not(.endop-action-head__icon) {
    display: block;
}

.endop-action-head strong {
    margin-bottom: 3px;
    color: #202020;
    font-size: 15px;
    line-height: 1.35;
    font-weight: 800;
}

.endop-action-head span:not(.endop-action-head__icon) {
    color: var(--endop-muted);
    font-size: 13px;
    line-height: 1.45;
}

.endop-password-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.endop-password-row input {
    padding-right: 17px;
    background: #fff;
}

.endop-password-row button,
.endop-open-button {
    min-height: 54px;
    padding: 0 26px;
    border: 0;
    border-radius: 14px;
    background: var(--endop-green);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(0, 155, 58, .18);
    transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.endop-password-row button:hover,
.endop-open-button:hover {
    transform: translateY(-1px);
    background: var(--endop-green-dark);
    box-shadow: 0 10px 22px rgba(0, 124, 46, .22);
}

.endop-password-row button:disabled {
    cursor: wait;
    opacity: .7;
}

.endop-open-button {
    width: 100%;
}

.endop-message {
    min-height: 20px;
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 700;
}

.endop-message.is-error { color: var(--endop-danger); }
.endop-message.is-success { color: var(--endop-success); }
.endop-message.is-loading { color: var(--endop-muted); }

/* Protected category / product gate */
.endop-gate-layout {
    padding: 36px 0 60px;
}

.endop-gate-layout .site-content {
    width: 100%;
}

.endop-gate-card {
    width: 100%;
    max-width: 620px;
    margin: 0 auto;
    padding: 38px;
    border: 1px solid var(--endop-line);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 20px 55px rgba(23, 23, 23, .09);
}

.endop-gate-card__title {
    margin: 0 0 12px;
    text-align: center;
    color: var(--endop-text);
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.12;
    font-weight: 800;
}

.endop-gate-card__description {
    max-width: 460px;
    margin: 0 auto 24px;
    text-align: center;
    color: var(--endop-muted);
    font-size: 15px;
    line-height: 1.6;
}

.endop-gate-card__form {
    max-width: 470px;
    margin: 0 auto;
}

.endop-gate-card .endop-password-row {
    grid-template-columns: 1fr;
}

.endop-gate-card .endop-password-row button {
    width: 100%;
}

.endop-gate-layout__head,
.endop-gate-layout__back,
.endop-gate-layout__page-title,
.endop-gate .woocommerce-notices-wrapper {
    display: none !important;
}

@media (max-width: 640px) {
    .endop-finder__panel {
        padding: 25px 17px;
        border-radius: 17px;
    }

    .endop-password-block,
    .endop-open-block {
        padding: 16px;
    }

    .endop-password-row {
        grid-template-columns: 1fr;
    }

    .endop-password-row button,
    .endop-open-button {
        width: 100%;
    }

    .endop-gate-layout {
        padding: 24px 0 42px;
    }

    .endop-gate-card {
        padding: 27px 18px;
        border-radius: 17px;
    }

    .endop-gate-card__title {
        font-size: 27px;
    }
}
