/**
 * eSIM cancel / refund — match contact / new-application form styling.
 * No decorative shadows.
 */

.esim-refund-page {
    background: var(--bg-light, #f5f6fb);
}

body.esim-refund-modal-open {
    overflow: hidden;
}

.esim-refund {
    min-height: 70vh;
    padding-bottom: 3.5rem;
}

/* Same hero gradient as contact / evisa-list */
.esim-refund__hero {
    background: linear-gradient(135deg, #296ff9 0%, #662acc 100%);
    color: #fff;
    padding:
        calc(2rem + var(--navbar-clearance, 88px) + var(--smart-app-banner-height, 0px))
        0
        2.75rem;
    text-align: center;
}

.esim-refund__hero > .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
    max-width: 40rem;
}

.esim-refund__hero h1 {
    margin: 0;
    font-size: clamp(1.75rem, 4vw, 2.35rem);
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    text-wrap: balance;
}

.esim-refund__hero .hero-subtitle {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.95);
    max-width: 34rem;
}

.esim-refund__main {
    margin-top: -1.35rem;
    position: relative;
    z-index: 1;
    display: grid;
    gap: 1.25rem;
    max-width: 40rem;
}

.esim-refund__panel {
    background: #fff;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 16px;
    padding: 1.75rem 1.5rem 1.85rem;
    box-shadow: none;
}

/* Estimate panel entrance after «Get estimate» */
.esim-refund__result.is-animating {
    animation: esim-refund-panel-in 0.48s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.esim-refund__result.is-animating .esim-refund__panel-title {
    animation: esim-refund-fade-up 0.42s cubic-bezier(0.22, 1, 0.36, 1) 0.06s both;
}

.esim-refund__result.is-animating .esim-refund__summary {
    animation: esim-refund-fade-up 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

.esim-refund__result.is-animating .esim-refund__summary-row {
    animation: esim-refund-fade-up 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.esim-refund__result.is-animating .esim-refund__summary-row:nth-child(1) { animation-delay: 0.14s; }
.esim-refund__result.is-animating .esim-refund__summary-row:nth-child(2) { animation-delay: 0.2s; }
.esim-refund__result.is-animating .esim-refund__summary-row:nth-child(3) { animation-delay: 0.26s; }
.esim-refund__result.is-animating .esim-refund__summary-row:nth-child(4) { animation-delay: 0.32s; }
.esim-refund__result.is-animating .esim-refund__summary-row:nth-child(5) { animation-delay: 0.38s; }

.esim-refund__result.is-animating .esim-refund__options-intro,
.esim-refund__result.is-animating .esim-refund__blocked {
    animation: esim-refund-fade-up 0.42s cubic-bezier(0.22, 1, 0.36, 1) 0.28s both;
}

.esim-refund__result.is-animating .esim-refund__option {
    animation: esim-refund-fade-up 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.esim-refund__result.is-animating .esim-refund__option:nth-child(1) { animation-delay: 0.34s; }
.esim-refund__result.is-animating .esim-refund__option:nth-child(2) { animation-delay: 0.42s; }
.esim-refund__result.is-animating .esim-refund__option:nth-child(3) { animation-delay: 0.5s; }

.esim-refund__result.is-animating .esim-refund__options-form .btn-primary {
    animation: esim-refund-fade-up 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.55s both;
}

@keyframes esim-refund-panel-in {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes esim-refund-fade-up {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .esim-refund__result.is-animating,
    .esim-refund__result.is-animating .esim-refund__panel-title,
    .esim-refund__result.is-animating .esim-refund__summary,
    .esim-refund__result.is-animating .esim-refund__summary-row,
    .esim-refund__result.is-animating .esim-refund__options-intro,
    .esim-refund__result.is-animating .esim-refund__blocked,
    .esim-refund__result.is-animating .esim-refund__option,
    .esim-refund__result.is-animating .esim-refund__options-form .btn-primary {
        animation: none !important;
    }
}

.esim-refund__panel-title {
    margin: 0 0 1.25rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-dark, #152033);
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.esim-refund__panel-title > i {
    color: var(--primary-color, #4361ee);
    font-size: 1.05rem;
}

.esim-refund__form .btn-primary,
.esim-refund__options-form .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
}

.esim-refund__form {
    display: grid;
    gap: 1rem;
}

.esim-refund__form .form-field {
    margin-bottom: 0;
}

.esim-refund__form .form-field-label {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-dark, #152033);
    margin-bottom: 0.5rem;
}

/* Match homepage flight tab «Search» (.btn-home-visa-search) */
.esim-refund__form .btn-primary {
    width: 100%;
    margin-top: 0.25rem;
    appearance: none;
    border: none;
    cursor: pointer;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'GM', sans-serif;
    border-radius: 12px;
    background: #1d4ed8;
    color: #fff;
    text-align: center;
    box-shadow: none;
    transform: none;
    transition: background 0.2s ease, transform 0.15s ease;
}

.esim-refund__form .btn-primary .btn-text {
    font-family: inherit;
    font-weight: inherit;
    font-size: inherit;
    color: inherit;
}

.esim-refund__form .btn-primary:hover:not(:disabled) {
    background: #1e40af;
    box-shadow: none;
    transform: none;
}

.esim-refund__form .btn-primary:active:not(:disabled) {
    transform: translateY(1px);
}

.esim-refund__form .btn-primary:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.esim-refund__alert {
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    border: 1px solid #f1c4c4;
    background: #fff5f5;
    color: #9b1c1c;
    font-size: 0.95rem;
    line-height: 1.45;
}

.esim-refund__alert.is-info {
    border-color: #c5d4f5;
    background: #f3f7ff;
    color: #1e3a8a;
}

.esim-refund__alert.is-ok {
    border-color: #b7e0cf;
    background: #f0faf5;
    color: #0f5132;
}

.esim-refund__summary {
    display: grid;
    gap: 0.65rem;
    margin-bottom: 1.15rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    background: #f8fafc;
    font-size: 0.95rem;
    color: #334155;
}

.esim-refund__summary-row {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
}

.esim-refund__summary-row > i {
    width: 1.1rem;
    text-align: center;
    margin-top: 0.15rem;
    color: var(--primary-color, #4361ee);
    flex-shrink: 0;
}

.esim-refund__summary-row bdi[dir="ltr"],
.esim-refund__option-desc bdi[dir="ltr"],
.esim-refund__success bdi[dir="ltr"] {
    unicode-bidi: isolate;
    direction: ltr;
    display: inline;
    white-space: nowrap;
}

.esim-refund__summary strong {
    color: var(--text-dark, #0f172a);
}

.esim-refund__blocked {
    margin-top: 0.25rem;
}

.esim-refund__blocked-card {
    display: grid;
    justify-items: center;
    gap: 0.65rem;
    padding: 1.35rem 1.15rem 1.25rem;
    border: 1px solid #f1c4c4;
    border-radius: 14px;
    background: #fff8f8;
    text-align: center;
    box-shadow: none;
}

.esim-refund__blocked-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: rgba(185, 28, 28, 0.1);
    color: #b91c1c;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
}

.esim-refund__blocked-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #7f1d1d;
    text-align: center;
}

.esim-refund__blocked-msg {
    margin: 0;
    max-width: 28rem;
    color: #9b1c1c;
    font-size: 0.98rem;
    line-height: 1.55;
    text-align: center;
}

.esim-refund__blocked-cta {
    margin-top: 0.45rem;
    width: 100%;
    max-width: 16rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: none;
    transform: none;
}

.esim-refund__blocked-cta:hover {
    box-shadow: none;
    transform: none;
}

html[dir="rtl"] .esim-refund__blocked-card,
html[dir="rtl"] .esim-refund__blocked-title,
html[dir="rtl"] .esim-refund__blocked-msg {
    text-align: center !important;
}

html[dir="rtl"] .esim-refund__blocked-title,
html[dir="rtl"] .esim-refund__blocked-msg,
html[dir="rtl"] .esim-refund__blocked-cta {
    font-family: 'GM', 'Segoe UI', Tahoma, sans-serif;
}

.esim-refund__options-intro {
    margin: 0 0 0.9rem;
    color: #334155;
    line-height: 1.45;
}

.esim-refund__options-form {
    display: grid;
    gap: 0.85rem;
}

.esim-refund__option {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 1rem 1.1rem;
    border: 3px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    box-shadow: none;
    transition: border-color 0.2s ease;
}

.esim-refund__option:has(input:checked) {
    border-color: var(--primary-color, #4361ee);
    background: #f5f7ff;
}

.esim-refund__option input {
    margin-top: 0.55rem;
    accent-color: var(--primary-color, #4361ee);
    flex-shrink: 0;
}

.esim-refund__option-icon {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 12px;
    background: rgb(238 241 255 / 70%);
    color: var(--primary-color, #4361ee);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.esim-refund__option:has(input:checked) .esim-refund__option-icon {
    background: rgba(67, 97, 238, 0.14);
}

.esim-refund__option-body {
    display: grid;
    gap: 0.3rem;
    min-width: 0;
}

.esim-refund__option-title {
    font-weight: 700;
    color: var(--text-dark, #152033);
    font-size: 1rem;
}

.esim-refund__option-desc {
    font-size: 0.92rem;
    color: #475569;
    line-height: 1.45;
}

.esim-refund__options-form .btn-primary {
    width: 100%;
    margin-top: 0.35rem;
    appearance: none;
    border: none;
    cursor: pointer;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'GM', sans-serif;
    border-radius: 12px;
    background: #1d4ed8;
    color: #fff;
    text-align: center;
    box-shadow: none;
    transform: none;
    transition: background 0.2s ease, transform 0.15s ease;
}

.esim-refund__options-form .btn-primary .btn-text {
    font-family: inherit;
    font-weight: inherit;
    font-size: inherit;
    color: inherit;
}

.esim-refund__options-form .btn-primary:hover:not(:disabled) {
    background: #1e40af;
    box-shadow: none;
    transform: none;
}

.esim-refund__options-form .btn-primary:active:not(:disabled) {
    transform: translateY(1px);
}

.esim-refund__options-form .btn-primary:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.esim-refund__success h3 {
    margin: 0 0 0.5rem;
    color: #0f5132;
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.esim-refund__success p {
    margin: 0 0 0.75rem;
    color: #334155;
    line-height: 1.5;
}

.esim-refund__promo-code {
    display: inline-block;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 1.15rem;
    letter-spacing: 0.06em;
    padding: 0.65rem 0.9rem;
    border: 1px dashed var(--primary-color, #4361ee);
    border-radius: 10px;
    background: #f5f7ff;
    color: var(--primary-color, #4361ee);
    font-weight: 700;
}

.esim-refund__notes {
    padding: 0 0.25rem;
}

.esim-refund__notes ul {
    margin: 0;
    padding-inline-start: 1.15rem;
    color: #475569;
    font-size: 0.92rem;
    line-height: 1.55;
}

.esim-refund__notes li + li {
    margin-top: 0.4rem;
}

@media (min-width: 768px) {
    .esim-refund__hero {
        padding:
            calc(2.5rem + var(--navbar-clearance, 88px) + var(--smart-app-banner-height, 0px))
            0
            3.25rem;
    }

    .esim-refund__panel {
        padding: 2rem 2rem 2.1rem;
    }
}

/* Confirmation modal — borders / contrast only (no decorative shadows). */
.esim-refund-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    padding-top: max(1rem, env(safe-area-inset-top, 0px));
    padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
}

.esim-refund-modal[hidden] {
    display: none !important;
}

.esim-refund-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.esim-refund-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(420px, 100%);
    background: #fff;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 16px;
    padding: 1.5rem 1.35rem 1.25rem;
    box-shadow: none;
    display: grid;
    gap: 0.75rem;
    text-align: center;
    box-sizing: border-box;
}

.esim-refund-modal__icon {
    width: 3rem;
    height: 3rem;
    margin: 0 auto;
    border-radius: 50%;
    background: rgba(67, 97, 238, 0.1);
    color: var(--primary-color, #4361ee);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

.esim-refund-modal__title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark, #152033);
    text-align: center;
}

.esim-refund-modal__msg {
    margin: 0;
    color: #475569;
    font-size: 0.98rem;
    line-height: 1.55;
    text-align: center;
}

.esim-refund-modal__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.esim-refund-modal__actions .btn-primary,
.esim-refund-modal__actions .btn-secondary {
    width: 100%;
    margin: 0;
    box-shadow: none;
    transform: none;
}

.esim-refund-modal__actions .btn-primary.loading,
.esim-refund-modal__actions .btn-primary.btn-loading {
    background: var(--primary-color, #4361ee) !important;
    color: #fff !important;
    border-radius: 10px !important;
}

.esim-refund-modal__actions .btn-primary.loading::before,
.esim-refund-modal__actions .btn-primary.btn-loading::before {
    border-color: rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
}

[dir="rtl"] .esim-refund-modal__title,
[dir="rtl"] .esim-refund-modal__msg,
[dir="rtl"] .esim-refund-modal__actions .btn-primary,
[dir="rtl"] .esim-refund-modal__actions .btn-secondary {
    font-family: 'GM', 'Segoe UI', Tahoma, sans-serif;
}

/* Override global RTL h3/p right-align so modal copy stays centered. */
html[dir="rtl"] .esim-refund-modal__dialog,
html[dir="rtl"] .esim-refund-modal__title,
html[dir="rtl"] .esim-refund-modal__msg {
    text-align: center !important;
}

[dir="rtl"] .esim-refund__hero h1,
[dir="rtl"] .esim-refund__hero .hero-subtitle,
[dir="rtl"] .esim-refund__panel-title,
[dir="rtl"] .esim-refund__form .form-field-label,
[dir="rtl"] .esim-refund__form .btn-primary,
[dir="rtl"] .esim-refund__alert,
[dir="rtl"] .esim-refund__summary,
[dir="rtl"] .esim-refund__blocked-title,
[dir="rtl"] .esim-refund__blocked-msg,
[dir="rtl"] .esim-refund__options-intro,
[dir="rtl"] .esim-refund__option-title,
[dir="rtl"] .esim-refund__option-desc,
[dir="rtl"] .esim-refund__options-form .btn-primary,
[dir="rtl"] .esim-refund__success h3,
[dir="rtl"] .esim-refund__success p,
[dir="rtl"] .esim-refund__notes li {
    font-family: 'GM', 'Segoe UI', Tahoma, sans-serif;
}
