/**
 * eSIMfly Public Styles
 * Modern, clean design for eSIM storefront
 */

:root {
    --esimfly-primary: #6366f1;
    --esimfly-primary-dark: #4f46e5;
    --esimfly-secondary: #10b981;
    --esimfly-danger: #ef4444;
    --esimfly-warning: #f59e0b;
    --esimfly-text: #1f2937;
    --esimfly-text-light: #6b7280;
    --esimfly-border: #e5e7eb;
    --esimfly-bg: #f9fafb;
    --esimfly-white: #ffffff;
    --esimfly-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --esimfly-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* ============================================
   FORCE FULL WIDTH FOR ESIM PAGES
   ============================================ */

body.esimfly-fullwidth-page .entry-header,
body.esimfly-fullwidth-page .page-header,
body.esimfly-fullwidth-page h1.entry-title,
body.esimfly-fullwidth-page .entry-title {
    display: none !important;
}

body.esimfly-fullwidth-page .site-content,
body.esimfly-fullwidth-page .entry-content,
body.esimfly-fullwidth-page #primary,
body.esimfly-fullwidth-page .content-area {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Remove all gaps between header and content */
body.esimfly-fullwidth-page .site-content,
body.esimfly-fullwidth-page #content,
body.esimfly-fullwidth-page .content-area,
body.esimfly-fullwidth-page article {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Container */
.esimfly-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Shop Page - Full Width */
.esimfly-shop {
    padding: 40px 0;
    margin: 0 !important;
    background: #f9fafb;
    width: 100vw !important;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
}

/* Remove any inherited spacing */
.esimfly-shop > *:first-child {
    margin-top: 0 !important;
}

.esimfly-shop > *:last-child {
    margin-bottom: 0 !important;
}

.esimfly-shop-header {
    text-align: center;
    margin-bottom: 40px;
}

.esimfly-shop-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--esimfly-text);
    margin-bottom: 10px;
}

.esimfly-shop-subtitle {
    font-size: 1.125rem;
    color: var(--esimfly-text-light);
}

/* Search and Filters */
.esimfly-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    align-items: center;
    background: var(--esimfly-white);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--esimfly-shadow);
}

.esimfly-search {
    flex: 1;
    min-width: 250px;
}

.esimfly-search input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--esimfly-border);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.esimfly-search input:focus {
    outline: none;
    border-color: var(--esimfly-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.esimfly-filter-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.esimfly-tab {
    padding: 10px 20px;
    background: var(--esimfly-bg);
    border: 1px solid var(--esimfly-border);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    color: var(--esimfly-text);
}

.esimfly-tab:hover {
    background: var(--esimfly-primary);
    color: var(--esimfly-white);
    border-color: var(--esimfly-primary);
}

.esimfly-tab.active {
    background: var(--esimfly-primary);
    color: var(--esimfly-white);
    border-color: var(--esimfly-primary);
}

/* Package Grid */
.esimfly-packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

/* Package Card - Modern Clean Design */
.esimfly-package-card {
    background: var(--esimfly-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(99, 102, 241, 0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.esimfly-package-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.2);
    border-color: var(--esimfly-primary);
}

.esimfly-package-header {
    padding: 28px 24px;
    background: linear-gradient(135deg, var(--esimfly-primary) 0%, var(--esimfly-primary-dark) 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.esimfly-package-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.esimfly-package-flag {
    width: 60px;
    height: 40px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.esimfly-package-name {
    font-size: 1.375rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
    color: white;
}

.esimfly-package-header h3,
.esimfly-package-header h3.esimfly-package-name {
    color: white;
    margin: 0;
}

.esimfly-package-region {
    font-size: 0.9375rem;
    opacity: 0.95;
    margin-top: 8px;
    color: white;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.esimfly-package-body {
    padding: 24px;
    flex: 1;
    background: var(--esimfly-white);
}

.esimfly-package-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
}

.esimfly-package-features li {
    padding: 10px 0;
    display: flex;
    align-items: center;
    color: var(--esimfly-text);
    font-size: 0.9375rem;
    font-weight: 500;
}

.esimfly-package-features li::before {
    content: "✓";
    display: inline-block;
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, var(--esimfly-secondary) 0%, #059669 100%);
    color: var(--esimfly-white);
    border-radius: 50%;
    text-align: center;
    line-height: 22px;
    margin-right: 12px;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.esimfly-package-footer {
    padding: 20px 24px;
    border-top: 1px solid rgba(99, 102, 241, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: linear-gradient(to bottom, var(--esimfly-white) 0%, var(--esimfly-gray-50) 100%);
}

.esimfly-package-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--esimfly-primary);
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

.esimfly-package-price-currency {
    font-size: 1.25rem;
    font-weight: 600;
    margin-right: 2px;
}

.esimfly-package-footer .esimfly-btn {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 10px 20px;
    font-size: 0.9375rem;
}

.esimfly-package-details-link {
    padding: 12px 24px;
    text-align: center;
    border-top: 1px solid var(--esimfly-gray-200);
}

.esimfly-details-link {
    color: var(--esimfly-text-light);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.esimfly-details-link:hover {
    color: var(--esimfly-primary);
    text-decoration: none;
}

.esimfly-btn {
    padding: 13px 24px;
    background: var(--esimfly-primary);
    color: var(--esimfly-white);
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-block;
    font-size: 1rem;
    line-height: 1.5;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

.esimfly-btn:hover {
    background: var(--esimfly-primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.35);
    color: var(--esimfly-white);
    text-decoration: none;
}

.esimfly-btn:active {
    transform: translateY(-1px);
}

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

.esimfly-btn-secondary {
    background: var(--esimfly-white);
    color: var(--esimfly-text);
    border: 2px solid var(--esimfly-gray-300);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.esimfly-btn-secondary:hover {
    background: var(--esimfly-gray-50);
    color: var(--esimfly-text);
    border-color: var(--esimfly-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.esimfly-btn-sm {
    padding: 10px 16px;
    font-size: 0.875rem;
}

/* Make buttons same height */
.esimfly-package-actions .esimfly-btn,
.esimfly-package-actions .esimfly-btn-sm {
    padding: 12px 16px;
    font-size: 0.9375rem;
}

/* Badge - Modern Style */
.esimfly-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.esimfly-badge-unlimited {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
}

.esimfly-badge-voice {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    color: white;
}

.esimfly-badge-global {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    color: white;
}

/* My eSIMs Dashboard */
.esimfly-dashboard {
    padding: 40px 0;
}

.esimfly-dashboard-header {
    background: var(--esimfly-white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--esimfly-shadow);
    margin-bottom: 30px;
}

.esimfly-dashboard-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--esimfly-text);
    margin: 0 0 10px 0;
}

.esimfly-dashboard-subtitle {
    color: var(--esimfly-text-light);
    margin: 0;
}

.esimfly-esim-list {
    display: grid;
    gap: 20px;
}

.esimfly-esim-card {
    background: var(--esimfly-white);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--esimfly-shadow);
    border: 1px solid var(--esimfly-border);
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 24px;
    align-items: start;
}

.esimfly-esim-qr {
    width: 120px;
    height: 120px;
}

.esimfly-esim-qr img {
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

.esimfly-esim-details h3 {
    margin: 0 0 8px 0;
    font-size: 1.25rem;
    color: var(--esimfly-text);
}

.esimfly-esim-meta {
    display: flex;
    gap: 20px;
    margin: 12px 0;
    flex-wrap: wrap;
}

.esimfly-esim-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--esimfly-text-light);
    font-size: 0.875rem;
}

.esimfly-esim-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.875rem;
    font-weight: 600;
}

.esimfly-esim-status.active {
    background: #d1fae5;
    color: #065f46;
}

.esimfly-esim-status.new {
    background: #dbeafe;
    color: #1e40af;
}

.esimfly-esim-status.expired {
    background: #fee2e2;
    color: #991b1b;
}

.esimfly-esim-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Loading State */
.esimfly-loading {
    text-align: center;
    padding: 60px 20px;
}

.esimfly-spinner {
    border: 4px solid var(--esimfly-border);
    border-top: 4px solid var(--esimfly-primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Empty State */
.esimfly-empty {
    text-align: center;
    padding: 60px 20px;
    background: var(--esimfly-white);
    border-radius: 12px;
    box-shadow: var(--esimfly-shadow);
}

.esimfly-empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.3;
}

.esimfly-empty-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--esimfly-text);
    margin-bottom: 10px;
}

.esimfly-empty-text {
    color: var(--esimfly-text-light);
    margin-bottom: 24px;
}

/* Notice */
.esimfly-notice {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.esimfly-notice-warning {
    background: #fef3c7;
    color: #92400e;
    border-left: 4px solid #f59e0b;
}

.esimfly-notice-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.esimfly-notice-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

/* Responsive */
@media (max-width: 768px) {
    .esimfly-shop-title {
        font-size: 2rem;
    }

    .esimfly-packages-grid {
        grid-template-columns: 1fr;
    }

    .esimfly-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .esimfly-search {
        min-width: 100%;
    }

    .esimfly-esim-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .esimfly-esim-qr {
        margin: 0 auto;
    }

    .esimfly-esim-meta {
        justify-content: center;
    }

    .esimfly-esim-actions {
        width: 100%;
    }
}
