/**
 * Customer Styles dla eSIM Activation
 */

/* eSIM Cards Grid */
.esim-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .esim-cards-grid {
        grid-template-columns: 1fr;
    }
}

/* eSIM Card */
.esim-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

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

/* Card Header */
.esim-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.esim-card-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.esim-card-status {
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Card Body */
.esim-card-body {
    padding: 20px;
}

/* Info Row */
.esim-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.esim-info-row:last-of-type {
    border-bottom: none;
}

.esim-info-label {
    font-weight: 600;
    color: #666;
    font-size: 14px;
}

.esim-info-value {
    color: #333;
    font-size: 14px;
}

.esim-info-value code {
    padding: 2px 6px;
    background: #f5f5f5;
    border-radius: 3px;
    font-size: 12px;
    color: #666;
}

/* Usage Section */
.esim-usage-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.esim-usage-title {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

/* Usage Stats */
.esim-usage-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.esim-usage-stat {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.esim-usage-stat-label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
    text-transform: uppercase;
    font-weight: 600;
}

.esim-usage-stat-value {
    display: block;
    font-size: 20px;
    color: #333;
    font-weight: 700;
}

/* Usage Bar */
.esim-usage-bar {
    position: relative;
    height: 30px;
    background: #f0f0f0;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 10px;
}

.esim-usage-bar-fill {
    position: relative;
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Warning states */
.esim-usage-warning .esim-usage-bar-fill {
    background: linear-gradient(90deg, #f093fb 0%, #f5576c 100%);
}

.esim-usage-critical .esim-usage-bar-fill {
    background: linear-gradient(90deg, #fa709a 0%, #fee140 100%);
}

.esim-usage-percentage {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Last Update */
.esim-last-update {
    margin: 10px 0 0 0;
    font-size: 12px;
    color: #999;
    text-align: center;
}

/* Card Footer */
.esim-card-footer {
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #e5e5e5;
}

.esim-refresh-btn {
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.esim-refresh-btn:hover {
    background: #5568d3;
    transform: translateY(-1px);
}

.esim-refresh-btn:active {
    transform: translateY(0);
}

.esim-refresh-btn.loading {
    opacity: 0.7;
    pointer-events: none;
}

.esim-refresh-btn.loading .esim-refresh-icon {
    animation: spin 1s linear infinite;
}

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

.esim-refresh-icon {
    font-size: 18px;
    display: inline-block;
}

/* Thank you page */
.woocommerce-esim-details {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border: 2px solid #667eea;
    border-radius: 8px;
}

.woocommerce-esim-details h2 {
    margin-top: 0;
    color: #667eea;
}

.woocommerce-table--esim-details {
    width: 100%;
    margin-bottom: 20px;
}

.woocommerce-table--esim-details th {
    text-align: left;
    padding: 12px;
    background: #fff;
    font-weight: 600;
}

.woocommerce-table--esim-details td {
    padding: 12px;
    background: #fff;
}

.esim-qr-code {
    text-align: center;
    padding: 20px;
    background: #fff;
    border-radius: 6px;
}

.esim-qr-code h3 {
    margin-top: 0;
}

.esim-qr-code img {
    max-width: 250px;
    height: auto;
}

.esim-note {
    margin-top: 20px;
    padding: 15px;
    background: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 6px;
    color: #856404;
}

/* Mobile responsiveness */
@media (max-width: 480px) {
    .esim-usage-stats {
        grid-template-columns: 1fr;
    }
    
    .esim-card-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}
