/**
 * User Dashboard Styles
 *
 * @package WooVirtualCard
 * @since 1.0.0
 */

/* Card Status Badges */
.wvc-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wvc-status-active {
    background: #c6e1c6;
    color: #2e7d2e;
}

.wvc-status-suspended {
    background: #fce4b8;
    color: #96631d;
}

.wvc-status-expired {
    background: #f0f0f1;
    color: #646970;
}

.wvc-status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

/* Card Brand Icons */
.wvc-brand-icon {
    font-weight: 600;
}

.wvc-brand-visa {
    color: #1434cb;
}

.wvc-brand-mastercard {
    color: #eb001b;
}

.wvc-brand-amex {
    color: #006fcf;
}

/* Cards List */
.wvc-cards-list {
    margin-bottom: 2em;
}

.wvc-card-row code {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Loading State */
.wvc-loading {
    text-align: center;
    padding: 2em;
    color: #666;
    font-style: italic;
}

.wvc-loading::after {
    content: '...';
    animation: wvc-dots 1.5s steps(4, end) infinite;
}

@keyframes wvc-dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60% { content: '...'; }
    80%, 100% { content: ''; }
}

/* Modal */
.wvc-modal {
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
}

.wvc-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: wvc-modal-appear 0.3s ease-out;
}

@keyframes wvc-modal-appear {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wvc-modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s;
}

.wvc-modal-close:hover,
.wvc-modal-close:focus {
    color: #000;
}

/* Error Messages */
.wvc-error {
    color: #dc3232;
    padding: 1em;
    border-left: 3px solid #dc3232;
    background: #fee;
    margin: 1em 0;
}

/* Success Messages */
.wvc-success {
    color: #46b450;
    padding: 1em;
    border-left: 3px solid #46b450;
    background: #ecf7ed;
    margin: 1em 0;
}

/* Responsive Adjustments */
@media screen and (max-width: 768px) {
    .wvc-modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
    
    .shop_table_responsive tbody tr td.wvc-card-actions {
        text-align: left;
    }
    
    .wvc-card-actions .button {
        display: block;
        width: 100%;
        margin-bottom: 5px;
        margin-right: 0;
    }
}

/* Top-Up Modal Styles */
.wvc-topup-form {
    padding: 1em 0;
}

.wvc-topup-form label {
    display: block;
    margin-bottom: 0.5em;
    font-weight: 600;
    color: #333;
}

.wvc-topup-amount {
    width: 100%;
    padding: 12px;
    font-size: 18px;
    border: 2px solid #ddd;
    border-radius: 4px;
    margin-bottom: 1.5em;
    transition: border-color 0.3s;
}

.wvc-topup-amount:focus {
    outline: none;
    border-color: #2c3e50;
}

.wvc-topup-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.wvc-topup-actions .button {
    flex: 1;
    max-width: 150px;
    text-align: center;
}

.wvc-topup-message {
    margin-top: 1em;
}

.wvc-topup-message p {
    margin: 0;
    padding: 1em;
    border-radius: 4px;
}

.wvc-topup-btn {
    margin-right: 5px;
    margin-bottom: 5px;
}

@media screen and (max-width: 480px) {
    .wvc-topup-actions {
        flex-direction: column;
    }
    
    .wvc-topup-actions .button {
        max-width: 100%;
    }
}

/* Credit Card UI Styles */
.wvc-credit-card {
    width: 100%;
    max-width: 420px;
    aspect-ratio: 1.586;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 28px 32px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    color: #ffffff;
    font-family: 'Courier New', Courier, monospace;
    position: relative;
    margin: 0 auto 24px;
    box-sizing: border-box;
}

.wvc-card-chip {
    width: 50px;
    height: 40px;
    background: linear-gradient(135deg, #f5c842 0%, #d4a537 100%);
    border-radius: 8px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.wvc-card-chip::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 60%;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 2px,
        rgba(0,0,0,0.1) 2px,
        rgba(0,0,0,0.1) 4px
    );
}

.wvc-card-logo {
    text-align: right;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.9;
    margin-bottom: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.wvc-card-number {
    font-size: 24px;
    letter-spacing: 3px;
    margin-bottom: 24px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    font-weight: 500;
}

.wvc-card-details {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.wvc-card-holder,
.wvc-card-expiry,
.wvc-card-cvv {
    display: flex;
    flex-direction: column;
}

.wvc-card-holder {
    flex: 1;
}

.wvc-card-expiry,
.wvc-card-cvv {
    text-align: right;
    margin-left: 16px;
}

.wvc-card-label {
    font-size: 10px;
    text-transform: uppercase;
    opacity: 0.7;
    letter-spacing: 1px;
    margin-bottom: 4px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.wvc-card-value {
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
}

.wvc-card-holder .wvc-card-value {
    font-size: 14px;
}

.wvc-card-info {
    margin-top: 24px;
}

.wvc-card-info table {
    width: 100%;
    background: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
}

.wvc-card-info th,
.wvc-card-info td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.wvc-card-info th {
    background: #f0f0f0;
    font-weight: 600;
    color: #333;
}

.wvc-card-info tr:last-child th,
.wvc-card-info tr:last-child td {
    border-bottom: none;
}

.wvc-security-notice {
    margin-top: 16px;
    padding: 12px;
    background: #fff3cd;
    border-left: 4px solid #ff6b6b;
    border-radius: 4px;
    font-size: 13px;
    color: #856404;
}

.wvc-security-notice strong {
    color: #dc3545;
}

@media screen and (max-width: 480px) {
    .wvc-credit-card {
        max-width: 100%;
        padding: 20px 24px;
    }
    
    .wvc-card-number {
        font-size: 20px;
        letter-spacing: 2px;
    }
    
    .wvc-card-value {
        font-size: 14px;
    }
    
    .wvc-card-holder .wvc-card-value {
        font-size: 12px;
    }
}
