/**
 * eSIM Destinations Consolidated Styles
 * Clean, optimized styles for destinations overview and single pages
 */

/* ========================================
   GLOBAL STYLES
   ======================================== */

.esim-destinations-page,
.esim-destinations-overview,
.esim-destination-single {
    background: #f8fafc;
    min-height: 100vh;
    padding: 24px 0;
}

.esim-destinations-container,
.esim-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   HEADER STYLES
   ======================================== */

.esim-destinations-header {
    text-align: center;
    margin-bottom: 32px;
    padding: 0 20px;
}

.esim-destinations-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 16px;
    line-height: 1.2;
}

.esim-destinations-header p {
    font-size: 1rem;
    color: #6b7280;
    margin-bottom: 24px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

/* ========================================
   SEARCH AND CONTROLS
   ======================================== */

.esim-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.esim-search-box {
    position: relative;
    max-width: 400px;
    flex: 1;
}

.esim-search-input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    transition: all 0.2s ease;
}

.esim-search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.esim-clear-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 18px;
    color: #6b7280;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: none;
    align-items: center;
    justify-content: center;
}

.esim-clear-btn:hover {
    color: #dc2626;
}

.esim-view-controls {
    display: flex;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.esim-view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    background: transparent;
    border: none;
    color: #6b7280;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px;
}

.esim-view-btn:hover {
    background: #f9fafb;
    color: #374151;
}

.esim-view-btn.active {
    background: #3b82f6;
    color: white;
}

.esim-view-btn svg {
    width: 16px;
    height: 16px;
}

.esim-results-info {
    text-align: center;
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 20px;
}

/* ========================================
   DESTINATIONS GRID
   ======================================== */

.esim-destinations-grid {
    display: grid;
    gap: 16px;
    margin-top: 0;
}

/* Responsive grid columns */
@media (min-width: 1400px) {
    .esim-destinations-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (min-width: 1200px) and (max-width: 1399px) {
    .esim-destinations-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .esim-destinations-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .esim-destinations-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 576px) and (max-width: 767px) {
    .esim-destinations-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .esim-destinations-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

/* List view */
.esim-destinations-grid[data-view="list"] {
    grid-template-columns: 1fr;
    gap: 8px;
}

/* ========================================
   DESTINATION CARDS
   ======================================== */

.esim-destination-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s ease;
    overflow: hidden;
}

.esim-destination-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #3b82f6;
}

.esim-destination-link {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 16px;
    height: 100%;
}

.esim-destination-flag {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
}

.esim-flag-img {
    width: 48px;
    height: 32px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.esim-flag-placeholder {
    width: 48px;
    height: 32px;
    background: #e5e7eb;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
}

.esim-destination-info {
    text-align: center;
}

.esim-destination-info h3 {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 8px 0;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.esim-destination-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.esim-plan-count {
    font-size: 12px;
    color: #6b7280;
}

.esim-min-price {
    font-size: 13px;
    color: #059669;
    font-weight: 600;
}

/* List view adjustments */
.esim-destinations-grid[data-view="list"] .esim-destination-card {
    border-radius: 6px;
}

.esim-destinations-grid[data-view="list"] .esim-destination-link {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
}

.esim-destinations-grid[data-view="list"] .esim-destination-flag {
    margin: 0;
}

.esim-destinations-grid[data-view="list"] .esim-destination-info {
    text-align: left;
}

.esim-destinations-grid[data-view="list"] .esim-destination-info h3 {
    font-size: 15px;
    white-space: normal;
}

.esim-destinations-grid[data-view="list"] .esim-destination-meta {
    flex-direction: row;
    gap: 16px;
    justify-content: flex-start;
}

.esim-destinations-grid[data-view="list"] .esim-min-price {
    margin-left: auto;
    font-size: 14px;
}

/* ========================================
   SINGLE DESTINATION PAGE
   ======================================== */

/* Breadcrumbs */
.esim-breadcrumbs {
    margin-bottom: 24px;
}

.esim-breadcrumbs ol {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 14px;
    color: #6b7280;
}

.esim-breadcrumbs li:not(:last-child)::after {
    content: '/';
    margin: 0 4px;
    color: #d1d5db;
}

.esim-breadcrumbs a {
    color: #6b7280;
    text-decoration: none;
}

.esim-breadcrumbs a:hover {
    color: #374151;
}

.esim-breadcrumbs li:last-child {
    color: #374151;
    font-weight: 500;
}

/* Header */
.esim-destination-header {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
}

.esim-title-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.esim-dest-flag {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 4px;
}

.esim-title-content {
    flex: 1;
}

.esim-title-content h1 {
    font-size: 24px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.esim-plans-count {
    font-size: 14px;
    color: #6b7280;
    background: #f3f4f6;
    padding: 4px 12px;
    border-radius: 20px;
    white-space: nowrap;
}

.esim-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #f9fafb;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s ease;
}

.esim-back-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.esim-back-btn svg {
    width: 16px;
    height: 16px;
}

/* Controls */
.esim-plan-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.esim-sort-dropdown {
    display: flex;
    align-items: center;
    gap: 8px;
}

.esim-sort-dropdown label {
    font-size: 14px;
    color: #374151;
    font-weight: 500;
}

.esim-sort-select {
    padding: 8px 32px 8px 12px;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    color: #111827;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    appearance: none;
}

.esim-sort-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ========================================
   PLAN CARDS
   ======================================== */

.esim-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    align-items: start;
}

/* Ensure grid view is default */
.esim-plans-grid:not([data-view="list"]) {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.esim-plan-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.esim-plan-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

/* Header */
.esim-plan-header {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f3f4f6;
}

.esim-plan-title-section {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.esim-plan-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0;
    line-height: 1.4;
    flex: 1;
}

.esim-provider-badge {
    font-size: 12px;
    color: #6b7280;
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 12px;
    white-space: nowrap;
}

.esim-plan-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.esim-plan-label {
    font-size: 11px;
    font-weight: 600;
    color: #1f2937;
    background: #e5e7eb;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.esim-discount-badge {
    font-size: 11px;
    font-weight: 700;
    color: white;
    background: #dc2626;
    padding: 3px 8px;
    border-radius: 10px;
}

/* Details */
.esim-plan-details {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
    margin-bottom: 20px;
}

.esim-plan-data {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.esim-data-amount {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
}

.esim-validity {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.esim-plan-price {
    text-align: right;
}

.esim-price-main {
    font-size: 18px;
    font-weight: 700;
    color: #059669;
    line-height: 1.2;
}

.esim-price-main del {
    font-size: 14px;
    color: #9ca3af;
    font-weight: 500;
}

.esim-price-per-gb {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}

/* Actions */
.esim-plan-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: auto;
}

.esim-actions-secondary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.esim-actions-primary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Buttons */
.esim-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid transparent;
    min-height: 40px;
    text-align: center;
    white-space: nowrap;
}

.esim-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.esim-btn:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.esim-btn-coverage,
.esim-btn-secondary,
.esim-btn-info {
    background: #f9fafb;
    color: #374151;
    border-color: #e5e7eb;
}

.esim-btn-coverage:hover,
.esim-btn-secondary:hover,
.esim-btn-info:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #111827;
}

.esim-btn-select {
    background: white;
    color: #3b82f6;
    border-color: #3b82f6;
}

.esim-btn-select:hover {
    background: #3b82f6;
    color: white;
}

.esim-btn-buy,
.esim-quick-add-btn {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.esim-btn-buy:hover,
.esim-quick-add-btn:hover {
    background: #2563eb;
    border-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

/* ========================================
   LIST VIEW FOR PLANS
   ======================================== */

.esim-plans-grid[data-view="list"] {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 1400px;
    margin: 0 auto;
}

.esim-plans-grid[data-view="list"] .esim-plan-card {
    display: grid;
    grid-template-columns: 3fr 1.5fr 1.2fr 2.3fr;
    grid-template-areas: "header data price actions";
    align-items: center;
    padding: 18px 24px;
    gap: 24px;
    min-height: 80px;
    border-radius: 8px;
    transition: all 0.15s ease;
    width: 100%;
    box-sizing: border-box;
}

.esim-plans-grid[data-view="list"] .esim-plan-card:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Header section with title and badges */
.esim-plans-grid[data-view="list"] .esim-plan-header {
    grid-area: header;
    margin: 0;
    padding: 0;
    border: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.esim-plans-grid[data-view="list"] .esim-plan-title-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
}

.esim-plans-grid[data-view="list"] .esim-plan-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
    color: #111827;
}

.esim-plans-grid[data-view="list"] .esim-plan-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.esim-plans-grid[data-view="list"] .esim-provider-badge {
    font-size: 11px;
    padding: 2px 6px;
    background: #f3f4f6;
    border-radius: 10px;
    color: #6b7280;
}

.esim-plans-grid[data-view="list"] .esim-discount-badge {
    font-size: 10px;
    padding: 2px 6px;
    background: #dc2626;
    color: white;
    border-radius: 8px;
    font-weight: 600;
}

.esim-plans-grid[data-view="list"] .esim-plan-label {
    font-size: 10px;
    padding: 2px 6px;
    background: #e5e7eb;
    color: #1f2937;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Data section */
.esim-plans-grid[data-view="list"] .esim-plan-details {
    grid-area: data;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-align: center;
}

.esim-plans-grid[data-view="list"] .esim-plan-data {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.esim-plans-grid[data-view="list"] .esim-data-amount {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
}

.esim-plans-grid[data-view="list"] .esim-validity {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

/* Price section */
.esim-plans-grid[data-view="list"] .esim-plan-price {
    grid-area: price;
    text-align: center;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.esim-plans-grid[data-view="list"] .esim-price-main {
    font-size: 16px;
    font-weight: 700;
    color: #059669;
    line-height: 1.2;
}

.esim-plans-grid[data-view="list"] .esim-price-main del {
    font-size: 13px;
    color: #9ca3af;
    font-weight: 500;
    margin-right: 4px;
}

.esim-plans-grid[data-view="list"] .esim-price-per-gb {
    font-size: 11px;
    color: #6b7280;
    margin-top: 2px;
}

/* Actions section */
.esim-plans-grid[data-view="list"] .esim-plan-actions {
    grid-area: actions;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 200px;
    margin: 0;
    align-items: center;
    justify-content: center;
}

.esim-plans-grid[data-view="list"] .esim-actions-secondary {
    display: flex;
    gap: 6px;
    justify-content: center;
    width: 100%;
}

.esim-plans-grid[data-view="list"] .esim-actions-primary {
    display: flex;
    gap: 8px;
    justify-content: center;
    width: 100%;
}

.esim-plans-grid[data-view="list"] .esim-btn {
    padding: 8px 12px;
    font-size: 12px;
    min-height: 36px;
    flex: 1;
    max-width: 90px;
    white-space: nowrap;
    text-align: center;
}

.esim-plans-grid[data-view="list"] .esim-btn svg {
    width: 12px;
    height: 12px;
}

.esim-plans-grid[data-view="list"] .esim-btn span {
    margin-left: 4px;
}

/* Medium screens - adjust columns */
@media (max-width: 1024px) {
    .esim-plans-grid[data-view="list"] .esim-plan-card {
        grid-template-columns: 2fr 1fr auto 1.5fr;
        gap: 16px;
        padding: 14px 18px;
        min-height: 75px;
    }
    
    .esim-plans-grid[data-view="list"] .esim-plan-title {
        font-size: 14px;
    }
    
    .esim-plans-grid[data-view="list"] .esim-data-amount {
        font-size: 15px;
    }
    
    .esim-plans-grid[data-view="list"] .esim-price-main {
        font-size: 15px;
    }
    
    .esim-plans-grid[data-view="list"] .esim-plan-actions {
        min-width: 180px;
    }
    
    .esim-plans-grid[data-view="list"] .esim-btn {
        padding: 7px 10px;
        font-size: 11px;
        min-height: 32px;
        max-width: 80px;
    }
}

/* Tablets - stack some elements */
@media (max-width: 768px) {
    .esim-plans-grid[data-view="list"] .esim-plan-card {
        grid-template-columns: 2fr 1fr 1.5fr;
        grid-template-areas: 
            "header data actions"
            "price price price";
        padding: 12px 16px;
        gap: 12px;
        min-height: auto;
    }
    
    .esim-plans-grid[data-view="list"] .esim-plan-price {
        grid-area: price;
        text-align: center;
        margin-top: 8px;
        padding-top: 8px;
        border-top: 1px solid #f3f4f6;
    }
    
    .esim-plans-grid[data-view="list"] .esim-plan-actions {
        min-width: auto;
        flex-direction: row;
        justify-content: flex-end;
    }
    
    .esim-plans-grid[data-view="list"] .esim-actions-secondary,
    .esim-plans-grid[data-view="list"] .esim-actions-primary {
        flex-direction: column;
        gap: 4px;
    }
}

/* Note: List view styles are properly defined above in the main section */

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablets */
@media (max-width: 768px) {
    .esim-destination-single {
        padding: 16px 0;
    }
    
    .esim-container {
        padding: 0 16px;
    }
    
    .esim-destination-header {
        padding: 16px;
        margin-bottom: 24px;
    }
    
    .esim-title-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .esim-title-content h1 {
        font-size: 20px;
    }
    
    .esim-plan-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .esim-plans-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 16px;
    }
    
    .esim-plan-card {
        padding: 16px;
    }
    
    /* Mobile controls */
    .esim-controls {
        flex-direction: column;
        gap: 16px;
    }
    
    .esim-search-box {
        width: 100%;
        max-width: none;
    }
    
    .esim-view-controls {
        align-self: center;
    }
}

/* Mobile phones */
@media (max-width: 600px) {
    .esim-plans-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .esim-plan-details {
        grid-template-columns: 1fr;
        gap: 12px;
        text-align: center;
    }
    
    .esim-plan-price {
        text-align: center;
    }
    
    .esim-actions-secondary,
    .esim-actions-primary {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .esim-btn {
        padding: 12px;
        font-size: 14px;
        min-height: 44px;
    }
    
    /* Mobile list view - full stack */
    .esim-plans-grid[data-view="list"] .esim-plan-card {
        grid-template-columns: 1fr;
        grid-template-areas: 
            "header"
            "data"
            "price"
            "actions";
        padding: 16px;
        gap: 12px;
        text-align: left;
        min-height: auto;
    }
    
    .esim-plans-grid[data-view="list"] .esim-plan-header {
        display: block;
    }
    
    .esim-plans-grid[data-view="list"] .esim-plan-title-section {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }
    
    .esim-plans-grid[data-view="list"] .esim-plan-details {
        align-items: flex-start;
        text-align: left;
    }
    
    .esim-plans-grid[data-view="list"] .esim-plan-price {
        text-align: left;
        border-top: none;
        margin-top: 0;
        padding-top: 0;
    }
    
    .esim-plans-grid[data-view="list"] .esim-plan-actions {
        min-width: auto;
        width: 100%;
        flex-direction: row;
        gap: 8px;
    }
    
    .esim-plans-grid[data-view="list"] .esim-actions-secondary,
    .esim-plans-grid[data-view="list"] .esim-actions-primary {
        flex: 1;
        flex-direction: row;
        gap: 6px;
    }
    
    .esim-plans-grid[data-view="list"] .esim-btn {
        flex: 1;
        max-width: none;
        min-height: 44px;
        font-size: 13px;
        padding: 12px 8px;
    }
    
    /* Mobile view controls */
    .esim-view-btn span {
        display: none;
    }
    
    .esim-view-btn svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .esim-plan-card {
        padding: 16px;
        border-radius: 8px;
    }
    
    .esim-plan-title {
        font-size: 15px;
    }
    
    .esim-data-amount {
        font-size: 18px;
    }
    
    .esim-price-main {
        font-size: 16px;
    }
}

/* ========================================
   NO RESULTS / LOADING STATES
   ======================================== */

.esim-no-destinations,
.esim-no-plans,
.esim-no-results {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin: 20px 0;
}

.esim-no-destinations h2,
.esim-no-plans h2,
.esim-no-results h3 {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 8px 0;
}

.esim-no-destinations p,
.esim-no-plans p,
.esim-no-results p {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 20px 0;
    line-height: 1.5;
}

.esim-loading-spinner {
    text-align: center;
    padding: 40px;
    color: #6b7280;
}

.spinner {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 2px solid #f3f4f6;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

.esim-btn:focus-visible,
.esim-sort-select:focus-visible,
.esim-view-btn:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .esim-plan-card,
    .esim-btn,
    .esim-destination-card {
        transition: none;
    }
    
    .spinner {
        animation: none;
    }
}

/* ========================================
   MODAL STYLES
   ======================================== */

.esim-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.esim-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: visible;
    opacity: 1;
}

.esim-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.esim-modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 95%;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    animation: modalFadeIn 0.2s ease-out;
    margin: 20px;
}

/* Mobile-first responsive design */
@media (max-width: 768px) {
    .esim-modal-content {
        max-width: calc(100vw - 40px);
        width: calc(100vw - 40px);
        max-height: calc(100vh - 40px);
        margin: 20px;
        border-radius: 8px;
    }
    
    .esim-modal-header {
        padding: 16px;
    }
    
    .esim-modal-body {
        padding: 16px;
        max-height: calc(100vh - 140px);
    }
    
    .esim-modal-header h3 {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .esim-modal-content {
        max-width: calc(100vw - 20px);
        width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
        margin: 10px;
        border-radius: 6px;
    }
    
    .esim-modal-header {
        padding: 12px;
    }
    
    .esim-modal-body {
        padding: 12px;
        max-height: calc(100vh - 120px);
    }
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.esim-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.esim-modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.esim-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.esim-modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.esim-modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(85vh - 140px);
    line-height: 1.6;
}

.esim-modal-body h3 {
    margin-top: 0;
    margin-bottom: 16px;
    color: #1f2937;
    font-size: 18px;
    font-weight: 600;
}

.esim-modal-body p {
    margin-bottom: 12px;
    color: #4b5563;
}

.esim-modal-body .esim-loading {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
    font-size: 16px;
}

.esim-modal-body .esim-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 10px;
    border: 2px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Enhanced content structure */
.esim-modal-body .esim-info-section {
    margin-bottom: 20px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.esim-modal-body .esim-info-section h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.esim-modal-body .esim-info-section p {
    margin: 0 0 8px 0;
    color: #4b5563;
    line-height: 1.5;
}

.esim-modal-body .esim-info-section p:last-child {
    margin-bottom: 0;
}

.esim-modal-body .esim-feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.esim-modal-body .esim-feature-list li {
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
}

.esim-modal-body .esim-feature-list li:last-child {
    border-bottom: none;
}

.esim-modal-body .esim-feature-list li::before {
    content: '✓';
    color: #059669;
    font-weight: bold;
    margin-right: 12px;
    font-size: 14px;
}

/* eSIM Info Modal Specific Styling */
.esim-info-details {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.esim-info-details .info-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e7eb;
}

.esim-info-details .info-items {
    display: grid;
    gap: 12px;
}

.esim-info-details .info-item {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    align-items: start;
}

.esim-info-details .info-label {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
    line-height: 1.4;
}

.esim-info-details .info-value {
    color: #1f2937;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.esim-info-details .no-info {
    text-align: center;
    padding: 32px;
    color: #6b7280;
    font-style: italic;
}

/* Mobile responsive for info items */
@media (max-width: 600px) {
    .esim-info-details .info-item {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .esim-info-details .info-label {
        font-weight: 700;
        color: #1f2937;
    }
}

/* Enhanced Coverage Modal Styling */
.esim-coverage-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.esim-coverage-empty {
    text-align: center;
    padding: 48px 24px;
    color: #6b7280;
}

.coverage-empty-icon {
    color: #d1d5db;
    margin-bottom: 16px;
}

.esim-coverage-header {
    margin-bottom: 24px;
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
}

.coverage-summary-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 8px 16px;
    background: #ecfdf5;
    border: 1px solid #d1fae5;
    border-radius: 8px;
    color: #059669;
    font-weight: 600;
}

.coverage-summary-top svg {
    color: #059669;
}

.coverage-count {
    font-size: 14px;
}

.coverage-disclaimer-header {
    margin-bottom: 20px;
    padding: 16px;
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 10px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-align: left;
}

.coverage-disclaimer-header svg {
    color: #f59e0b;
    margin-top: 2px;
    flex-shrink: 0;
}

.disclaimer-text p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #92400e;
}

.disclaimer-text strong {
    color: #78350f;
}

.coverage-main-title {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px 0;
}

.coverage-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

.esim-coverage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.esim-country-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    transition: all 0.2s ease;
}

.esim-country-card:hover {
    background: #ffffff;
    border-color: #d1d5db;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.country-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.country-flag {
    width: 32px;
    height: 24px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.country-flag-placeholder {
    width: 32px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e5e7eb;
    border-radius: 4px;
    color: #9ca3af;
}

.country-flag-placeholder svg {
    width: 20px;
    height: 20px;
}

.country-name {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    flex: 1;
}

.network-list-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.network-label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.network-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.network-item:hover {
    background: #f8fafc;
    border-color: #d1d5db;
}

.network-name {
    font-weight: 500;
    color: #374151;
    font-size: 14px;
    flex: 1;
}

.network-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 32px;
}

.network-badge-5g {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.network-badge-4g {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.network-badge-3g {
    background: #fed7aa;
    color: #92400e;
    border: 1px solid #fb923c;
}

.network-names {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.4;
    flex: 1;
}

.no-network-info {
    font-size: 13px;
    color: #9ca3af;
    font-style: italic;
}

.esim-coverage-footer {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.coverage-summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    color: #6b7280;
}

.coverage-summary svg {
    color: #3b82f6;
}

.coverage-disclaimer {
    margin-top: 16px;
    padding: 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.coverage-disclaimer svg {
    color: #f59e0b;
    margin-top: 2px;
    flex-shrink: 0;
}

.coverage-disclaimer p {
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
    color: #6b7280;
}

/* Mobile responsiveness for coverage modal */
@media (max-width: 768px) {
    .esim-coverage-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .esim-country-card {
        padding: 14px;
    }
    
    .coverage-main-title {
        font-size: 20px;
    }
    
    .country-name {
        font-size: 15px;
    }
    
    .network-badge {
        font-size: 10px;
        padding: 3px 6px;
    }
    
    .network-item {
        padding: 6px 10px;
    }
    
    .network-name {
        font-size: 13px;
    }
    
    .coverage-disclaimer {
        padding: 10px;
    }
    
    .coverage-disclaimer p {
        font-size: 11px;
    }
    
    .coverage-summary-top {
        padding: 6px 12px;
        margin-bottom: 12px;
    }
    
    .coverage-count {
        font-size: 13px;
    }
    
    .coverage-disclaimer-header {
        padding: 12px;
        margin-bottom: 16px;
    }
    
    .disclaimer-text p {
        font-size: 12px;
    }
}

/* Loading state for coverage modal */
.esim-modal-body .esim-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

/* Smooth scrolling for long coverage lists */
.esim-modal-body {
    scrollbar-width: thin;
    scrollbar-color: #d1d5db #f3f4f6;
}

.esim-modal-body::-webkit-scrollbar {
    width: 8px;
}

.esim-modal-body::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 4px;
}

.esim-modal-body::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.esim-modal-body::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Modal actions styling */
.esim-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.esim-modal-actions .esim-btn {
    min-width: 120px;
}

.esim-btn-cancel {
    background: #f9fafb;
    color: #374151;
    border: 1px solid #d1d5db;
}

.esim-btn-cancel:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.esim-btn-confirm {
    background: #3b82f6;
    color: white;
    border: 1px solid #3b82f6;
}

.esim-btn-confirm:hover {
    background: #2563eb;
    border-color: #2563eb;
}

.esim-btn-confirm:disabled {
    background: #d1d5db;
    color: #9ca3af;
    border-color: #d1d5db;
    cursor: not-allowed;
}

/* Mobile modal improvements */
@media (max-width: 768px) {
    .esim-modal-content {
        width: 95%;
        max-height: 90vh;
        margin: 20px;
        border-radius: 8px;
    }
    
    .esim-modal-header {
        padding: 16px 20px;
    }
    
    .esim-modal-body {
        padding: 20px;
        max-height: calc(90vh - 120px);
    }
    
    .esim-modal-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .esim-modal-actions .esim-btn {
        width: 100%;
        min-width: auto;
    }
}