/**
 * ESChE Member Renewal Page
 */

.esche-renewal {
    --renewal-primary: #6a00ff;
    --renewal-primary-dark: #4d00bd;
    --renewal-text: #171717;
    --renewal-muted: #71717a;
    --renewal-border: #e7e7ec;
    --renewal-background: #f8f8fb;
    --renewal-card: #ffffff;
    --renewal-success: #16794b;
    --renewal-danger: #c73535;
    --renewal-warning: #9a6700;

    width: 100%;
    color: var(--renewal-text);
    font-family: inherit;
    box-sizing: border-box;
}

.esche-renewal *,
.esche-renewal *::before,
.esche-renewal *::after {
    box-sizing: border-box;
}

.esche-renewal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.esche-renewal__eyebrow {
    display: block;
    margin-bottom: 9px;
    color: var(--renewal-primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.esche-renewal__title {
    margin: 0;
    color: var(--renewal-text);
    font-size: clamp(25px, 3vw, 34px);
    font-weight: 750;
    line-height: 1.2;
}

.esche-renewal__subtitle {
    margin: 10px 0 0;
    color: var(--renewal-muted);
    font-size: 14px;
    line-height: 1.7;
}

.esche-renewal__card {
    margin-bottom: 22px;
    padding: 26px;
    overflow: hidden;
    background: var(--renewal-card);
    border: 1px solid var(--renewal-border);
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(25, 25, 40, 0.035);
}

.esche-renewal__card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.esche-renewal__card-header h3 {
    margin: 0;
    color: var(--renewal-text);
    font-size: 18px;
    font-weight: 750;
    line-height: 1.4;
}

.esche-renewal__card-header p {
    margin: 6px 0 0;
    color: var(--renewal-muted);
    font-size: 13px;
    line-height: 1.6;
}

.esche-renewal__badge {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    min-height: 29px;
    padding: 6px 11px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 750;
    line-height: 1.3;
}

.esche-renewal__badge.is-active {
    color: #166534;
    background: #dcfce7;
}

.esche-renewal__badge.is-expired {
    color: #b42318;
    background: #fee4e2;
}

.esche-renewal__badge.is-pending {
    color: #854d0e;
    background: #fef3c7;
}

.esche-renewal__badge.is-rejected {
    color: #b42318;
    background: #fee4e2;
}

.esche-renewal__badge.is-neutral {
    color: #52525b;
    background: #f0f0f4;
}

.esche-renewal__membership-details {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    padding-top: 22px;
    border-top: 1px solid var(--renewal-border);
}

.esche-renewal__detail {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 8px;
}

.esche-renewal__detail-label {
    color: var(--renewal-muted);
    font-size: 12px;
    font-weight: 550;
}

.esche-renewal__detail strong {
    overflow-wrap: anywhere;
    color: var(--renewal-text);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
}

.esche-renewal__state-card {
    text-align: center;
}

.esche-renewal__state-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    margin: 0 auto 18px;
    border-radius: 50%;
    color: var(--renewal-primary);
    background: #f0e8ff;
    font-size: 25px;
    font-weight: 800;
}

.esche-renewal__state-card > .esche-renewal__badge {
    margin-bottom: 12px;
}

.esche-renewal__state-card h3 {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 750;
    line-height: 1.4;
}

.esche-renewal__state-card > p {
    max-width: 650px;
    margin: 0 auto;
    color: var(--renewal-muted);
    font-size: 14px;
    line-height: 1.8;
}

.esche-renewal__request-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    max-width: 650px;
    margin: 25px auto 0;
    padding: 20px;
    text-align: left;
    background: var(--renewal-background);
    border: 1px solid var(--renewal-border);
    border-radius: 12px;
}

.esche-renewal__request-details > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 7px;
}

.esche-renewal__request-details span {
    color: var(--renewal-muted);
    font-size: 12px;
}

.esche-renewal__request-details strong {
    overflow-wrap: anywhere;
    font-size: 13px;
}

.esche-renewal__important-note {
    margin-top: 22px !important;
    padding: 13px 16px;
    color: #854d0e !important;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
}

.esche-renewal__instructions {
    margin-bottom: 26px;
    padding: 17px 19px;
    color: #4b5563;
    background: #faf8ff;
    border: 1px solid #e9ddff;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.8;
}

.esche-renewal__instructions p {
    margin: 0 0 8px;
}

.esche-renewal__instructions ul {
    margin: 0;
    padding-left: 21px;
}

.esche-renewal__instructions li {
    margin: 4px 0;
}

.esche-renewal__form {
    width: 100%;
}

.esche-renewal__field {
    margin-bottom: 23px;
}

.esche-renewal__field > label {
    display: block;
    margin-bottom: 9px;
    color: var(--renewal-text);
    font-size: 13px;
    font-weight: 700;
}

.esche-renewal__field > label > span {
    color: var(--renewal-muted);
    font-size: 12px;
    font-weight: 500;
}

.esche-renewal__field > label > span[aria-hidden="true"] {
    color: var(--renewal-danger);
}

.esche-renewal__field input[type="text"],
.esche-renewal__field textarea {
    display: block;
    width: 100%;
    min-height: 47px;
    padding: 12px 14px;
    color: var(--renewal-text);
    background: #fff;
    border: 1px solid #dcdce5;
    border-radius: 9px;
    box-shadow: none;
    font: inherit;
    font-size: 13px;
    line-height: 1.5;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.esche-renewal__field textarea {
    min-height: 115px;
    resize: vertical;
}

.esche-renewal__field input[type="text"]:focus,
.esche-renewal__field textarea:focus {
    outline: none;
    border-color: var(--renewal-primary);
    box-shadow: 0 0 0 3px rgba(106, 0, 255, 0.1);
}

.esche-renewal__field input::placeholder,
.esche-renewal__field textarea::placeholder {
    color: #a1a1aa;
}

.esche-renewal__field-help {
    margin: 9px 0 0;
    color: var(--renewal-muted);
    font-size: 12px;
    line-height: 1.6;
}

.esche-renewal__upload {
    position: relative;
    padding: 24px;
    border: 1.5px dashed #cfc4e8;
    border-radius: 12px;
    background: #fcfaff;
    text-align: center;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease;
}

.esche-renewal__upload:hover,
.esche-renewal__upload.is-dragging {
    border-color: var(--renewal-primary);
    background: #f6f0ff;
}

.esche-renewal__upload input[type="file"] {
    display: block;
    width: 100%;
    margin: 0 0 18px;
    color: #52525b;
    font: inherit;
    font-size: 12px;
}

.esche-renewal__upload input[type="file"]::file-selector-button {
    margin-right: 12px;
    padding: 9px 13px;
    color: #fff;
    background: var(--renewal-primary);
    border: 0;
    border-radius: 7px;
    font: inherit;
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
}

.esche-renewal__upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.esche-renewal__upload-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-bottom: 4px;
    color: var(--renewal-primary);
    background: #eee5ff;
    border-radius: 12px;
    font-size: 24px;
    font-weight: 700;
}

.esche-renewal__upload-content strong {
    font-size: 13px;
    font-weight: 750;
}

.esche-renewal__upload-content > span:last-child {
    color: var(--renewal-muted);
    font-size: 11px;
}

.esche-renewal__file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
    padding: 12px 14px;
    text-align: left;
    background: #fff;
    border: 1px solid var(--renewal-border);
    border-radius: 9px;
}

.esche-renewal__file-info > span {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--renewal-text);
    font-size: 12px;
    font-weight: 600;
}

.esche-renewal__file-info button {
    flex: 0 0 auto;
    padding: 6px 9px;
    color: var(--renewal-danger);
    background: transparent;
    border: 0;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.esche-renewal__file-info button:hover {
    text-decoration: underline;
}

.esche-renewal__form-error {
    margin-bottom: 18px;
    padding: 12px 14px;
    color: #991b1b;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 9px;
    font-size: 13px;
    line-height: 1.6;
}

.esche-renewal__form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding-top: 21px;
    border-top: 1px solid var(--renewal-border);
}

.esche-renewal__form-footer > p {
    max-width: 360px;
    margin: 0;
    color: var(--renewal-muted);
    font-size: 12px;
    line-height: 1.7;
}

.esche-renewal__submit {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    min-height: 47px;
    padding: 12px 20px;
    color: #fff;
    background: var(--renewal-primary);
    border: 1px solid var(--renewal-primary);
    border-radius: 9px;
    box-shadow: 0 4px 10px rgba(106, 0, 255, 0.13);
    font: inherit;
    font-size: 12px;
    font-weight: 750;
    text-align: center;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.esche-renewal__submit:hover {
    color: #fff;
    background: var(--renewal-primary-dark);
    border-color: var(--renewal-primary-dark);
    box-shadow: 0 6px 14px rgba(106, 0, 255, 0.2);
    transform: translateY(-1px);
}

.esche-renewal__submit:focus-visible {
    outline: 3px solid rgba(106, 0, 255, 0.25);
    outline-offset: 3px;
}

.esche-renewal__submit:disabled {
    opacity: 0.65;
    cursor: wait;
    transform: none;
}

.esche-renewal__disclaimer {
    margin: 17px 0 0;
    color: var(--renewal-muted);
    font-size: 11px;
    line-height: 1.7;
}

.esche-renewal__admin-feedback {
    max-width: 700px;
    margin: 24px auto 0;
    padding: 17px 18px;
    text-align: left;
    background: #fff8f7;
    border: 1px solid #f5c7c3;
    border-radius: 10px;
}

.esche-renewal__admin-feedback > span {
    display: block;
    margin-bottom: 8px;
    color: #991b1b;
    font-size: 12px;
    font-weight: 750;
}

.esche-renewal__admin-feedback > p {
    margin: 0;
    color: #52525b;
    font-size: 13px;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.esche-renewal__notice {
    margin: 0 0 22px;
    padding: 14px 17px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.7;
}

.esche-renewal__notice.is-success {
    color: #166534;
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.esche-renewal__notice.is-error {
    color: #991b1b;
    background: #fef2f2;
    border-color: #fecaca;
}

.esche-renewal__notice.is-warning {
    color: #854d0e;
    background: #fffbeb;
    border-color: #fde68a;
}

.esche-renewal__notice.is-info {
    color: #3730a3;
    background: #eef2ff;
    border-color: #c7d2fe;
}

.esche-renewal [hidden] {
    display: none !important;
}

@media (max-width: 760px) {
    .esche-renewal__card {
        padding: 21px;
        border-radius: 13px;
    }

    .esche-renewal__membership-details {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 21px 15px;
    }

    .esche-renewal__form-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .esche-renewal__form-footer > p {
        max-width: none;
    }

    .esche-renewal__submit {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .esche-renewal__header {
        margin-bottom: 21px;
    }

    .esche-renewal__card {
        padding: 17px;
        margin-bottom: 17px;
    }

    .esche-renewal__card-header {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 19px;
    }

    .esche-renewal__membership-details {
        grid-template-columns: minmax(0, 1fr);
        gap: 17px;
    }

    .esche-renewal__request-details {
        grid-template-columns: minmax(0, 1fr);
        padding: 16px;
    }

    .esche-renewal__upload {
        padding: 17px 12px;
    }

    .esche-renewal__file-info {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .esche-renewal *,
    .esche-renewal *::before,
    .esche-renewal *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}