/* Country page styles — ported from the WordPress country.html page. */

:root {
    --2primary: #034f5c;
    --2primary-dark: #1698a5;
    --2secondary: #1698a5;
    --2text: #1d2327;
    --2light: #f8f9fa;
    --2gray: #adb5bd;
    --2success: #4cc9f0;
    --2white: #ffffff;
    --2shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --2radius: 12px;

    --ESIMprimary: #008080;
    --ESIMprimary-hover: #005555;
    --ESIMprimary-light: #e6f5f5;
    --ESIMtext: #0b1a33;
    --ESIMtext-light: #5b6f8e;
    --ESIMtext-faint: #97a8c2;
    --ESIMborder: #eef1f7;
    --ESIMborder-soft: #e6edf8;
    --ESIMcard-shadow: 0 4px 20px rgba(15, 35, 75, 0.06);
}

.country-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}
.country-page header {
    text-align: center;
    margin-bottom: -10px;
}

/* Country hero header (large image + name overlay) */
.country-header {
    position: relative;
    height: 250px;
    margin-bottom: 2rem;
    border-radius: var(--2radius);
    overflow: hidden;
    box-shadow: var(--2shadow);
}
.country-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.country-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    padding: 1rem;
    font-size: 1.5rem;
    font-weight: 600;
}

/* Search */
.country-selector {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    position: relative;
}
.select-wrapper {
    position: relative;
    width: 400px;
    max-width: 100%;
}
.country-page .search-container {
    position: relative;
    width: 100%;
    z-index: 100;
}
.country-page .search-input {
    width: 100%;
    padding: 12px 20px;
    font-size: 1rem;
    border: 2px solid #e9ecef;
    border-radius: var(--2radius);
    background-color: var(--2white);
    transition: all 0.3s ease;
    box-shadow: none;
}
.country-page .search-input:focus {
    outline: none;
    border-color: var(--2primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}
.country-page .results-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 300px;
    overflow-y: auto;
    background: white;
    border-radius: var(--2radius);
    box-shadow: var(--2shadow);
    z-index: 101;
    display: none;
    margin-top: 5px;
    border: 1px solid #e9ecef;
}
.country-page .result-item {
    padding: 10px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.2s;
}
.country-page .result-item:hover { background-color: #f8f9fa; }
.country-page .result-item img {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
}

/* Plan list container */
.country-page #esim-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}
.country-page .no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: var(--2gray);
    margin-bottom: 40vh;
}
.group-description {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #4f4f4f !important;
    transition: all 0.3s ease;
    min-height: 20px;
}

/* Main Standard/Unlimited toggle */
.toggle-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}
.main-toggle-switch {
    display: inline-flex;
    background: white;
    border-radius: 12px;
    padding: 3px;
    gap: 4px;
    box-shadow: 0 8px 20px rgba(0, 110, 110, 0.15);
    position: relative;
}
.main-toggle-btn {
    all: unset;
    cursor: pointer;
    padding: 10px 42px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    color: #036672;
    background: white;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.5px;
    text-align: center;
    position: relative;
    z-index: 2;
}
.main-toggle-btn.active {
    background: linear-gradient(165deg, #008181, #006b6b);
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    font-weight: 600;
    transform: scale(1.02);
}
.main-toggle-btn:not(.active):hover {
    color: #005f5f;
    background: rgba(0, 130, 130, 0.05);
    backdrop-filter: blur(4px);
}

/* Buy button loading state */
.buy-now.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
    min-width: 120px;
    transition: opacity 0.3s ease;
}
.buy-now.loading i { animation: spin 1s linear infinite; }
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Unlimited sub-toggle */
.unlimited-toggle-wrapper {
    width: 100%;
    display: none;
    justify-content: center;
    margin-bottom: 1.5rem;
}
.unlimited-toggle-wrapper.show { display: flex !important; }
.unlimited-switch {
    display: inline-flex;
    background: white;
    border-radius: 12px;
    padding: 3px;
    gap: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.unlimited-switch button {
    all: unset;
    cursor: pointer;
    padding: 8px 34px;
    border-radius: 12px;
    font-size: 14.5px;
    font-weight: 550;
    color: #036672;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.4px;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
}
.unlimited-switch button.active {
    background: linear-gradient(165deg, #008181, #006b6b);
    color: white;
    box-shadow:
        0 6px 14px rgba(0, 110, 110, 0.2),
        0 2px 4px rgba(0, 80, 80, 0.1),
        inset 0 1px 2px rgba(255, 255, 255, 0.1);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    font-weight: 600;
    letter-spacing: 0.5px;
}
.unlimited-switch button:not(.active):hover {
    color: #005f5f;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(4px);
}

@media (max-width: 600px) {
    .main-toggle-btn { padding: 8px 25px; font-size: 14px; }
    .unlimited-switch button { padding: 6px 20px; font-size: 13px; }
    .country-page { padding: 0.5rem; }
    .country-header { height: 100px; margin-bottom: 1.4rem; }
    .country-title { padding: 0.75rem; font-size: 1.4rem; }
    .country-page #esim-list { grid-template-columns: 1fr; }
}

/* ---------- Provider card system (shared by both providers) ---------- */
.second-provider-section {
    max-width: 560px;
    width: 100%;
    margin: 30px auto 0;
    padding-top: 25px;
    border-top: 2px solid var(--ESIMborder);
}
.second-provider-header { margin-bottom: 20px; text-align: center; }
.second-provider-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--ESIMtext);
    margin-bottom: 8px;
}
.skeleton-line {
    height: 14px;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--ESIMborder) 25%, #f7f9fc 37%, var(--ESIMborder) 63%);
    background-size: 400% 100%;
    animation: shimmer 1.4s ease infinite;
    margin: 0 auto;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.second-provider-loading {
    background: #ffffff;
    border-radius: 24px;
    padding: 40px 28px;
    box-shadow: var(--ESIMcard-shadow);
    border: 1px solid var(--ESIMborder);
    text-align: center;
}
.second-provider-spinner {
    width: 46px;
    height: 46px;
    border: 4px solid var(--ESIMborder-soft);
    border-top-color: var(--ESIMprimary);
    border-radius: 50%;
    margin: 0 auto 18px;
    animation: spin 0.8s linear infinite;
}
.second-provider-loading p { color: var(--ESIMtext-light); font-size: 15px; font-weight: 500; margin: 0; }
.second-provider-loading .sub { color: var(--ESIMtext-faint); font-size: 13px; margin-top: 4px; font-weight: 400; }

.second-provider-package-box {
    background: #ffffff;
    border-radius: 24px;
    padding: 26px;
    box-shadow: var(--ESIMcard-shadow);
    border: 1px solid var(--ESIMborder);
    display: none;
}
.second-provider-step {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.second-provider-step:not(:first-child) { margin-top: 6px; }
.second-provider-step-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--ESIMprimary);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.second-provider-step-label { font-size: 14.5px; font-weight: 700; color: var(--ESIMtext); }
.second-provider-data-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
    gap: 10px;
    margin-bottom: 26px;
}
.second-provider-option-pill {
    padding: 13px 10px;
    background: #f7fbfb;
    border-radius: 16px;
    border: 2px solid var(--ESIMborder-soft);
    font-size: 15px;
    font-weight: 700;
    color: var(--ESIMtext);
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
    user-select: none;
    position: relative;
}
.second-provider-option-pill:hover { border-color: #99cccc; background: var(--ESIMprimary-light); }
.second-provider-option-pill.active {
    border-color: var(--ESIMprimary);
    background: var(--ESIMprimary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0,128,128,0.28);
}
.second-provider-duration-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
    gap: 10px;
    margin-bottom: 24px;
}
.second-provider-duration-pill {
    padding: 12px 10px;
    background: #f7fbfb;
    border: 2px solid var(--ESIMborder-soft);
    border-radius: 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ESIMtext);
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
    user-select: none;
}
.second-provider-duration-pill:hover { border-color: #99cccc; background: var(--ESIMprimary-light); }
.second-provider-duration-pill.active {
    border-color: var(--ESIMprimary);
    background: var(--ESIMprimary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0,128,128,0.28);
}

/* Price & buy row */
.second-provider-action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 22px;
    border-top: 1px solid var(--ESIMborder);
    flex-wrap: wrap;
}
.second-provider-price-display { display: flex; align-items: baseline; gap: 4px; }
.second-provider-price-display .currency { font-size: 18px; font-weight: 700; color: var(--ESIMtext-light); }
.second-provider-price-display .amount { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; color: var(--ESIMtext); }
.second-provider-price-display .price-label { font-size: 13px; color: var(--ESIMtext-faint); margin-left: 4px; }
.second-provider-buy-btn {
    background: linear-gradient(135deg, var(--2primary), var(--2primary-dark));
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    text-decoration: none;
    box-shadow: var(--2shadow);
}
.second-provider-buy-btn:hover {
    background: linear-gradient(135deg, var(--2primary-dark), var(--2secondary));
    transform: translateY(-2px);
    color: white;
    box-shadow: 0 8px 20px rgba(3, 79, 92, 0.3);
}
.second-provider-buy-btn:active { transform: scale(0.97); }
.second-provider-buy-btn i { font-size: 0.8rem; }
.second-provider-buy-btn.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
    min-width: 120px;
}
.second-provider-buy-btn.loading i { animation: spin 1s linear infinite; }

/* Error / empty */
.second-provider-error-box {
    background: #ffffff;
    padding: 44px 28px;
    border-radius: 24px;
    text-align: center;
    border: 1px solid var(--ESIMborder);
    box-shadow: var(--ESIMcard-shadow);
    display: none;
}
.second-provider-error-box i { font-size: 50px; color: var(--ESIMprimary-light); margin-bottom: 14px; }
.second-provider-error-box h2 { font-weight: 700; color: var(--ESIMtext); font-size: 21px; margin-bottom: 6px; }
.second-provider-error-box p { color: var(--ESIMtext-light); font-size: 15px; }

/* Best value badges */
.second-provider-option-pill.best-value { position: relative; }
.second-provider-option-pill.best-value.active {
    background: var(--ESIMprimary);
    border-color: var(--ESIMprimary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0,128,128,0.28);
    animation: none;
}
.second-provider-option-pill.best-value .best-badge {
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    background: #FF6B35;
    color: white;
    font-size: 8px;
    font-weight: 800;
    padding: 2px 14px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(255, 140, 0, 0.25);
}
.second-provider-option-pill.best-value:hover:not(.active) {
    border-color: #FF6B00;
    background: #FFF3E0;
}
.badge-star { color: #fff; margin-right: 4px; }
.best-badge { color: #ffd700; }

#firstProviderDataOptions .second-provider-option-pill.best-value-first {
    position: relative;
    border-color: #FF6B35;
    background: #FFF5F0;
    box-shadow: 0 4px 16px rgba(255, 107, 53, 0.15);
}
#firstProviderDataOptions .second-provider-option-pill.best-value-first.active {
    background: var(--ESIMprimary);
    border-color: var(--ESIMprimary);
    color: #fff;
}
#firstProviderDataOptions .second-provider-option-pill.best-value-first .best-badge-first {
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    background: #FF6B35;
    color: white;
    font-size: 8px;
    font-weight: 800;
    padding: 2px 14px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.25);
}
#firstProviderDataOptions .second-provider-option-pill.best-value-first:hover:not(.active) {
    border-color: #FF6B35;
    background: #FFF0E8;
}

.second-provider-highlight {
    box-shadow: 0 0 30px rgba(255, 107, 53, 0.3);
    transition: box-shadow 0.3s ease;
}

@media (max-width: 480px) {
    .second-provider-package-box { padding: 20px; }
    .second-provider-price-display .amount { font-size: 28px; }
    .second-provider-buy-btn { padding: 13px 24px; font-size: 15px; justify-content: center; }
    .second-provider-action-row { flex-direction: column; align-items: stretch; }
}
@keyframes fadeUp {
    0% { opacity: 0; transform: translateY(8px); }
    100% { opacity: 1; transform: translateY(0); }
}
.second-provider-section { animation: fadeUp 0.3s ease-out; }
.second-provider-fade-in { animation: fadeUp 0.25s ease-out; }

/* Europe regional-plan suggestion box */
#europeSuggestionBox { border-top: 4px solid var(--ESIMprimary); }
