/* eSIM Reseller Plugin Frontend Styles */

/* Reset and Base Styles */
.esim-plans-grid,
.esim-single-plan,
.plan-filters,
.destination-browser {
    box-sizing: border-box;
    font-family: Plus Jakarta Sans;
}

.esim-plans-grid *,
.esim-single-plan *,
.plan-filters *,
.destination-browser * {
    box-sizing: border-box;
}

/* Main eSIM Page - Destination Browser */
.destination-browser {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.search-section {
    text-align: center;
    margin-bottom: 40px;
}

.search-section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 20px 0;
}

.destination-search {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.destination-search-input {
    width: 100%;
    padding: 16px 24px;
    font-size: 1.1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
    background: #ffffff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

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

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    margin-top: 4px;
}

.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.suggestion-item:hover,
.suggestion-item.active {
    background-color: #f8fafc;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-flag {
    font-size: 1.2rem;
}

.suggestion-name {
    font-weight: 600;
    color: #1f2937;
}

.suggestion-type {
    font-size: 0.85rem;
    color: #6b7280;
    margin-left: auto;
}

/* Destinations Grid */
.destinations-grid {
    display: grid;
    gap: 40px;
    margin-top: 40px;
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.destination-category {
    background: white;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #f3f4f6;
    width: 100%;
    overflow: hidden;
}

.destination-category h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 24px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
}

/* Countries Pagination Controls */
.countries-pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 30px auto 20px auto;
    max-width: 1200px;
    padding: 0 20px;
    flex-wrap: wrap;
    gap: 20px;
}

.alphabet-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.alphabet-btn {
    padding: 8px 12px;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 6px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    min-width: 40px;
    text-align: center;
}

.alphabet-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.alphabet-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.countries-count {
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 500;
}

/* Countries Pagination */
.countries-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 30px auto;
    max-width: 1200px;
    padding: 0 20px;
}

.pagination-btn {
    padding: 10px 16px;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 8px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.pagination-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    text-decoration: none;
}

.pagination-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0 16px;
}

.destination-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.destination-items.countries-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important;
    gap: 16px !important;
    margin-top: 20px;
    width: 100%;
}

.destination-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    padding: 20px 16px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    text-decoration: none !important;
    color: inherit !important;
    transition: all 0.3s ease;
    text-align: center !important;
    min-height: 120px;
    justify-content: center !important;
    box-sizing: border-box;
}

.destination-item:hover {
    background: #ffffff;
    border-color: #3b82f6;
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
    text-decoration: none !important;
    color: inherit !important;
}

.destination-item.small {
    padding: 20px 16px;
    min-height: 100px;
}

.destination-item.hidden {
    display: none !important;
}

/* Debug styles for countries grid */
.destination-item {
    border: 1px solid #e5e7eb !important;
    background: #f9fafb !important;
}

.destination-item:hover {
    border-color: #3b82f6 !important;
    background: #ffffff !important;
}

.destination-flag {
    font-size: 2rem !important;
    margin-bottom: 8px;
    display: block !important;
}

.destination-item.small .destination-flag {
    font-size: 1.8rem !important;
    margin-bottom: 8px;
}

.destination-name {
    font-weight: 600 !important;
    color: #1f2937 !important;
    margin-bottom: 4px;
    font-size: 0.95rem;
    line-height: 1.3;
    display: block !important;
}

.destination-item.small .destination-name {
    font-size: 0.9rem !important;
    font-weight: 600 !important;
}

.destination-desc {
    font-size: 0.8rem;
    color: #6b7280;
}

/* Minimal Filters for Country/Regional Pages */
.plan-filters.minimal {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid #f3f4f6;
}

.plan-filters.minimal .filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}

.plan-filter-select,
.plan-filter,
.plan-search-input {
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
    transition: border-color 0.2s ease;
    outline: none;
}

.plan-filter-select:focus,
.plan-filter:focus,
.plan-search-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.plan-filter-select.active,
.plan-filter.active,
.plan-search-input.active {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1) !important;
}

.filter-results {
    margin-top: 12px;
    padding: 8px 12px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #0369a1;
    text-align: center;
}

/* Plan Cards Grid */
.esim-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.esim-plan-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #f3f4f6;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.esim-plan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1);
    border-color: #e5e7eb;
}

/* Admin Controls */
.admin-controls {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 10;
}

.delete-plan-btn {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 6px;
    padding: 6px 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    opacity: 0;
    transform: scale(0.8);
}

.esim-plan-card:hover .delete-plan-btn {
    opacity: 1;
    transform: scale(1);
}

.delete-plan-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    transform: scale(1.1);
}

/* Delete Modal */
.delete-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.delete-modal {
    background: white;
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease;
}

.delete-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 0 24px;
    border-bottom: 1px solid #f3f4f6;
    margin-bottom: 24px;
}

.delete-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
}

.delete-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6b7280;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.delete-modal-close:hover {
    color: #1f2937;
    background: #f3f4f6;
}

.delete-modal-body {
    padding: 0 24px 24px 24px;
}

.delete-modal-body p {
    margin: 0 0 24px 0;
    color: #374151;
    font-size: 1rem;
    line-height: 1.5;
}

.delete-options {
    display: grid;
    gap: 12px;
}

.delete-option-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
}

.delete-option-btn:hover {
    border-color: #3b82f6;
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.delete-option-btn.soft-delete:hover {
    border-color: #f59e0b;
    background: #fffbeb;
}

.delete-option-btn.hard-delete:hover {
    border-color: #ef4444;
    background: #fef2f2;
}

.option-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.option-content {
    flex: 1;
}

.option-content strong {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.option-content small {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.3;
}
.plan-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 16px;
}

.plan-name {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    line-height: 1.3;
    flex: 1;
}

.plan-price {
    display: flex;
    align-items: baseline;
    gap: 2px;
    color: #002158;
    font-weight: 700;
    flex-shrink: 0;
}

.plan-price .currency {
    font-size: 1rem;
}

.plan-price .amount {
    font-size: 16px;
}

.plan-features {
    flex: 1;
    margin-bottom: 10px;
}

.feature {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 0;
    border-bottom: 1px solid #f3f4f6;
}

.feature:last-child {
    border-bottom: none;
}

.feature-label {
    font-size: 0.9rem;
    color: #000000;
    font-weight: 500;
}

.feature-value {
    font-size: 0.9rem;
    color: #1f2937;
    font-weight: 600;
    text-align: right;
}

.plan-footer {
    margin-top: auto;
}

.btn-buy-now {
	display: block;
    width: 60%;
    padding: 6px 6px;
    background: #3b82f6;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.btn-buy-now:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    text-decoration: none;
    color: white;
}

.btn-buy-now.disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

.btn-buy-now.disabled:hover {
    background: #9ca3af;
    transform: none;
}

/* Single Plan Display */
.esim-single-plan {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #f3f4f6;
}

.esim-single-plan .plan-header {
    text-align: center;
    margin-bottom: 24px;
}

.esim-single-plan .plan-name {
    font-size: 2rem;
    margin-bottom: 16px;
}

.plan-price-large {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    color: #059669;
    font-weight: 700;
}

.plan-price-large .currency {
    font-size: 1.5rem;
}

.plan-price-large .amount {
    font-size: 3rem;
}

.plan-description {
    margin-bottom: 32px;
    text-align: center;
}

.plan-description p {
    font-size: 1.1rem;
    color: #6b7280;
    line-height: 1.6;
}

.plan-features-detailed {
    margin-bottom: 32px;
}

.feature-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f3f4f6;
}

.feature-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.feature-row.full-width {
    grid-template-columns: 1fr;
}

.feature-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.feature-col strong {
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 600;
}

.feature-col span {
    font-size: 1rem;
    color: #1f2937;
    font-weight: 600;
}

.btn-buy-now-large {
    display: block;
    width: 100%;
    padding: 16px 32px;
    background: #3b82f6;
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 700;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
}

.btn-buy-now-large:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    text-decoration: none;
    color: white;
}

.btn-buy-now-large.disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

/* Coverage Popup */
.coverage-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.coverage-popup {
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideIn 0.3s ease;
}

.coverage-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.coverage-popup-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.coverage-popup-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.2s ease;
}

.coverage-popup-close:hover {
    color: #1f2937;
}

.coverage-countries {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
}

.coverage-country {
    padding: 8px 12px;
    background: #f9fafb;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #374151;
}

.coverage-link {
    color: #3b82f6;
    text-decoration: none;
    cursor: pointer;
    font-weight: 500;
}

.coverage-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .countries-pagination-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    
    .alphabet-filter {
        justify-content: center;
    }
    
    .alphabet-btn {
        min-width: 35px;
        padding: 6px 8px;
        font-size: 0.8rem;
    }
    
    .countries-count {
        text-align: center;
    }
    
    .countries-pagination {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .pagination-btn {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    .destination-browser {
        padding: 16px;
        margin: 0;
    }
    
    .search-section h2 {
        font-size: 2rem;
    }
    
    .destination-category {
        padding: 24px 20px;
        margin: 0;
    }
    
    .destination-items {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 12px;
    }
    
    .destination-items.countries-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }
    
    .plan-filters.minimal .filter-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .esim-plans-grid {
		display: grid;
        grid-template-columns: repeat(auto-fit, minmax(220px, 2fr));
        gap: 16px;
    }
    
    .plan-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .plan-price {
        align-self: flex-end;
    }
    
    .feature-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .coverage-popup {
        padding: 24px 20px;
        margin: 10px;
    }
    
    .coverage-countries {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .destination-search-input {
        padding: 14px 20px;
        font-size: 1rem;
    }
    
    .destination-category {
        padding: 20px 16px;
    }
    
    .destination-items {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .destination-items.countries-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .destination-item.small {
        padding: 16px 12px;
        min-height: 90px;
    }
    
    .destination-item.small .destination-flag {
        font-size: 1.5rem;
        margin-bottom: 6px;
    }
    
    .destination-item.small .destination-name {
        font-size: 0.8rem;
    }
    
    .esim-single-plan {
        padding: 24px 20px;
    }
    
    .plan-price-large .amount {
        font-size: 2.5rem;
    }
    
    .coverage-popup {
        padding: 20px 16px;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* eSIM Search Bar Styles */
.esim-search-container {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    position: relative;
    font-family: Plus Jakarta Sans;
}

.esim-search-container.clean-search {
    max-width: 500px;
}

.esim-search-wrapper {
    position: relative;
    width: 100%;
}

.search-input-container {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 50px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.search-input-container:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1), 0 4px 20px rgba(0, 0, 0, 0.15);
}

.esim-search-input {
    flex: 1;
    padding: 16px 24px;
    border: none;
    outline: none;
    font-size: 1rem;
    background: transparent;
    color: #1f2937;
    width: 100%;
    box-sizing: border-box;
}

.esim-search-input::placeholder {
    color: #6b7280;
}

.esim-search-input.redirecting {
    opacity: 0.6;
    pointer-events: none;
}

.search-icon-static {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 1.2rem;
    pointer-events: none;
    transition: color 0.3s ease;
}

.search-input-container:focus-within .search-icon-static {
    color: #3b82f6;
}

.esim-search-input:not(:placeholder-shown) + .search-icon-static {
    display: flex;
}

.esim-search-input:placeholder-shown + .search-icon-static {
    display: flex;
}

.esim-search-input:focus + .search-icon-static {
    display: none;
}

/* Search Results */
.esim-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 320px;
    overflow-y: auto;
    margin-top: 12px;
    animation: slideDown 0.3s ease;
    backdrop-filter: blur(10px);
}

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

.search-result-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.2s ease;
    gap: 16px;
}

.search-result-item:hover,
.search-result-item.selected {
    background: linear-gradient(90deg, #f0f9ff, #ffffff);
    border-left: 4px solid #3b82f6;
    transform: translateX(2px);
}

.search-result-item:last-child {
    border-bottom: none;
    border-radius: 0 0 16px 16px;
}

.search-result-item:first-child {
    border-radius: 16px 16px 0 0;
}

.result-flag {
    font-size: 1.8rem;
    flex-shrink: 0;
    width: 32px;
    text-align: center;
}

.result-content {
    flex: 1;
    min-width: 0;
}

.result-name {
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 4px;
    font-size: 1rem;
    line-height: 1.2;
}

.result-type {
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.country-result .result-type {
    color: #059669;
}

.region-result .result-type {
    color: #7c3aed;
}

/* Loading, No Results, Error States */
.search-loading,
.search-no-results,
.search-error {
    padding: 40px 20px;
    text-align: center;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f1f5f9;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

.loading-text,
.no-results-text,
.error-text {
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.no-results-suggestion,
.error-suggestion {
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.4;
}

.no-results-icon,
.error-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.7;
}

/* Compact and Minimal Styles */
.esim-search-container[data-style="compact"] {
    max-width: 400px;
}

.esim-search-container[data-style="compact"] .esim-search-input {
    padding: 14px 20px;
    font-size: 0.95rem;
}

.esim-search-container[data-style="compact"] .search-icon-static {
    right: 16px;
}

.esim-search-container[data-style="minimal"] {
    max-width: 300px;
}

.esim-search-container[data-style="minimal"] .search-input-container {
    border-radius: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.esim-search-container[data-style="minimal"] .esim-search-input {
    padding: 12px 18px;
    font-size: 0.9rem;
}

.esim-search-container[data-style="minimal"] .search-icon-static {
    right: 14px;
    font-size: 1.1rem;
}

.esim-search-container[data-style="minimal"] .esim-search-results {
    border-radius: 12px;
    margin-top: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .esim-search-container {
        max-width: 100%;
        margin: 0;
        padding: 0 16px;
    }
    
    .esim-search-container.clean-search {
        max-width: 100%;
    }
    
    .esim-search-input {
        padding: 14px 20px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .search-icon-static {
        right: 16px;
        font-size: 1.1rem;
    }
    
    .search-result-item {
        padding: 14px 16px;
        gap: 12px;
    }
    
    .result-flag {
        font-size: 1.6rem;
        width: 28px;
    }
    
    .result-name {
        font-size: 0.95rem;
    }
    
    .result-type {
        font-size: 0.75rem;
    }
    
    .esim-search-results {
        margin-top: 8px;
        border-radius: 12px;
        max-height: 280px;
    }
}

@media (max-width: 480px) {
    .esim-search-container {
        padding: 0 12px;
    }
    
    .search-input-container {
        border-radius: 25px;
    }
    
    .esim-search-input {
        padding: 12px 18px;
    }
    
    .search-icon-static {
        right: 14px;
    }
    
    .search-result-item {
        padding: 12px 14px;
    }
    
    .esim-search-results {
        border-radius: 10px;
    }
}

/* Smooth scrolling for results */
.esim-search-results {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.esim-search-results::-webkit-scrollbar {
    width: 6px;
}

.esim-search-results::-webkit-scrollbar-track {
    background: transparent;
}

.esim-search-results::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.esim-search-results::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Focus states for accessibility */
.search-result-item:focus {
    outline: 2px solid #3b82f6;
    outline-offset: -2px;
}

.esim-search-input:focus {
    outline: none;
}

/* Loading state for input */
.esim-search-input.loading {
    background-image: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* eSIM Cart Pricing Styles */
.esim-commission-price,
.esim-commission-subtotal,
.esim-cart-price {
    font-weight: bold !important;
    color: #2c5aa0 !important;
}

.esim-commission-price .woocommerce-Price-amount,
.esim-commission-subtotal .woocommerce-Price-amount,
.esim-cart-price .woocommerce-Price-amount {
    font-weight: bold !important;

/* Timeline Styles */
.timeline-container {
    max-height: 400px;
    overflow-y: auto;
}

.timeline-event:last-child {
    border-bottom: none;
}

.esim-status-badge {
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-events {
    border-left: 3px solid #3b82f6;
}

.event-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.event-icon {
    margin-right: 8px;
}

.event-text {
    flex: 1;
}

.event-time {
    font-style: italic;
}

/* Responsive timeline */
@media (max-width: 768px) {
    .timeline-event {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .event-icon {
        margin-bottom: 10px;
    }
    
    .event-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .event-time {
        margin-top: 5px;
    }
}

/* User Dashboard Styles */
.esim-user-dashboard,
.esim-user-events-full {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.esim-user-stats {
    margin-bottom: 32px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-item {
    display: flex;
    align-items: center;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    font-size: 2rem;
    margin-right: 16px;
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.9rem;
    color: #718096;
    font-weight: 500;
}

.esim-recent-activity h4,
.esim-user-events-full h3 {
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 1.25rem;
    font-weight: 600;
}

.esim-events-list,
.esim-events-timeline {
    background: #f7fafc;
    border-radius: 8px;
    padding: 16px;
    max-height: 500px;
    overflow-y: auto;
}

.user-event-item:last-child {
    border-bottom: none;
}

.event-header {
    margin-bottom: 8px;
}

.event-description {
    font-size: 14px;
    line-height: 1.4;
}

.event-details {
    background: rgba(59, 130, 246, 0.1);
    padding: 8px 12px;
    border-radius: 6px;
    margin-top: 8px;
    font-family: Plus Jakarta Sans;
}

.event-order {
    font-style: italic;
}

/* Dashboard Widget Styles */
.esim-dashboard-widget {
    font-size: 13px;
}

.esim-dashboard-widget h4 {
    margin-top: 0;
    margin-bottom: 12px;
    color: #23282d;
}

.dashboard-event-item:last-child {
    border-bottom: none;
}

/* Responsive User Dashboard */
@media (max-width: 768px) {
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .stat-item {
        padding: 16px;
        flex-direction: column;
        text-align: center;
    }
    
    .stat-icon {
        margin-right: 0;
        margin-bottom: 8px;
    }
    
    .user-event-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .event-icon {
        margin-bottom: 12px;
        margin-right: 0;
    }
    
    .event-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .stat-grid {
        grid-template-columns: 1fr;
    }
    
    .esim-user-dashboard,
    .esim-user-events-full {
        padding: 16px;
        margin: 10px 0;
    }
}

/* ============================
   eSIM Customer Details Styling
   ============================ */
.esim-customer-details {
  margin: 20px 0;
  padding: 20px;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* Profile Card */
.esim-profile-customer {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  padding: 20px;
  margin: 15px 0;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.esim-profile-customer:hover {
  background: #ffffff;
  box-shadow: 0 3px 8px rgba(0,0,0,0.08);
}

/* Grid Layout */
.esim-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin: 15px 0;
}

.esim-details-grid div {
  padding: 6px 0;
  font-size: 14px;
  color: #374151;
}

.esim-details-grid strong {
  color: #111827;
}

/* QR Code */
.esim-qr-code img {
  max-width: 160px;
  border: 4px solid #f3f4f6;
  border-radius: 12px;
  padding: 6px;
  background: #fff;
}

/* Status Badge */
.esim-status-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
  text-transform: uppercase;
}

/* Buttons */
.esim-customer-actions {
  margin-top: 15px;
}

.esim-customer-actions .button {
  margin: 5px 8px 0 0;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
}

/* ============================
   Responsive Styles
   ============================ */
@media (max-width: 768px) {
  .esim-details-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
  }

  .esim-qr-code img {
    max-width: 120px;
  }

  .esim-customer-actions {
    display: flex;
    flex-direction: column;
  }

  .esim-customer-actions .button {
    width: 100%;
    margin: 5px 0;
    text-align: center;
  }
}

