/* Currency Cards Styles - Alooads-inspired design system */
:root {
    --alo-primary: #00b59f; /* teal/green brand */
    --alo-primary-dark: #009983;
    --alo-primary-900: #066a5e;
    --alo-bg: #f5f9f9;
    --alo-surface: #ffffff;
    --alo-border: #e6efef;
    --alo-muted: #6c7d7d;
    --alo-success: #2ecc71;
    --alo-accent: #f6c343; /* warm yellow used for highlights */
}

.currency-cards-container {
    font-family: Vazirmatn, IRANSans, sans-serif;
    direction: rtl;
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    background: var(--alo-bg);
    border-radius: 16px;
}

.currency-tabs {
    display: flex;
    margin-bottom: 24px;
    border-bottom: 0;
    gap: 8px;
    flex-wrap: wrap;
}

.tab-button {
    background: #eef6f5;
    border: 1px solid var(--alo-border);
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border-radius: 999px;
    transition: all 0.25s ease;
    font-family: Vazirmatn, IRANSans, sans-serif;
    color: var(--alo-primary-900);
}

.tab-button:hover {
    background-color: #ddeeed;
    border-color: var(--alo-primary);
}

.tab-button.active {
    background: linear-gradient(180deg, var(--alo-primary) 0%, var(--alo-primary-dark) 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(0, 181, 159, 0.25);
}

/* Currency filter tabs */
.currency-filters {
    margin-bottom: 30px;
    text-align: center;
}

.currency-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 16px;
}

.currency-tab {
    background: #eef6f5;
    border: 1px solid var(--alo-border);
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: Vazirmatn, IRANSans, sans-serif;
    color: var(--alo-primary-900);
}

.currency-tab:hover {
    background: #ddeeed;
    border-color: var(--alo-primary);
    color: var(--alo-primary-dark);
}

.currency-tab.active {
    background: linear-gradient(180deg, var(--alo-primary) 0%, var(--alo-primary-dark) 100%);
    border-color: transparent;
    color: white;
    box-shadow: 0 6px 18px rgba(0, 181, 159, 0.28);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.pricing-card {
    background: var(--alo-surface);
    border: 1px solid var(--alo-border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    position: relative;
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
    border-color: #d7eceb;
}

.card-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.pricing-card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 18px;
}

.card-title {
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 8px 0;
    color: #083e3a;
    text-align: center;
}

.card-description {
    color: var(--alo-muted);
    margin: 0 0 16px 0;
    line-height: 1.7;
}

.card-pricing {
    background: #f0f7f6;
    padding: 14px;
    border-radius: 12px;
    margin-bottom: 16px;
    border: 1px dashed #d7eceb;
}

.base-amount,
.commission {
    font-size: 13px;
    color: var(--alo-muted);
    margin-bottom: 6px;
}

.final-price {
    font-size: 16px;
    font-weight: 800;
    color: var(--alo-primary-dark);
    margin-top: 10px;
}

.price-amount {
    color: #e53935;
    font-size: 22px;
}

.buy-button {
    width: 100%;
    background: linear-gradient(180deg, var(--alo-primary) 0%, var(--alo-primary-dark) 100%);
    color: white;
    border: none;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: -0.2px;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: Vazirmatn, IRANSans, sans-serif;
    box-shadow: 0 8px 22px rgba(0, 181, 159, 0.3);
}

.buy-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 181, 159, 0.35);
}

.buy-button:active {
    transform: translateY(0);
}

/* Loading states */
.buy-button.loading {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.85;
    box-shadow: none;
}

.buy-button.loading:hover {
    background: #6c757d;
    transform: none;
    box-shadow: none;
}

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Persian text styling */
.price-amount {
    color: #e53935;
    font-size: 22px;
    font-weight: 800;
    direction: ltr;
    text-align: left;
    font-family: Vazirmatn, IRANSans, sans-serif;
    font-feature-settings: "tnum" 1, "lnum" 1; /* tabular/lining numerals */
}

.price-amount.loading {
    color: #999;
    font-style: italic;
}

/* Persian card content */
.card-title {
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 8px 0;
    color: #083e3a;
    text-align: center;
}

.card-description {
    color: var(--alo-muted);
    margin: 0 0 16px 0;
    line-height: 1.7;
    text-align: center;
    font-size: 14px;
}

.card-pricing {
    background: #f0f7f6;
    padding: 14px;
    border-radius: 12px;
    margin-bottom: 16px;
    text-align: center;
    border: 1px dashed #d7eceb;
}

.base-amount,
.commission {
    font-size: 13px;
    color: var(--alo-muted);
    margin-bottom: 6px;
    text-align: center;
}

.final-price {
    font-size: 16px;
    font-weight: 800;
    color: var(--alo-primary-dark);
    margin-top: 10px;
    text-align: center;
}

.final-price-label {
    font-size: 14px;
    color: var(--alo-muted);
    margin-bottom: 5px;
    text-align: center;
}

/* Category ribbons */
.pricing-card[data-category="dedicated"]::before,
.pricing-card[data-category="managed"]::before {
    content: attr(data-category);
    position: absolute;
    top: 12px;
    left: 12px;
    font-size: 12px;
    font-weight: 800;
    padding: 6px 10px;
    border-radius: 999px;
    background: #eef6f5;
    color: var(--alo-primary-900);
    border: 1px solid var(--alo-border);
}

.pricing-card[data-category="dedicated"]::before {
    content: 'اکانت اختصاصی';
    background: #fff7df;
    border-color: #ffe6a3;
    color: #8a6a00;
}

.pricing-card[data-category="managed"]::before {
    content: 'اکانت مدیریت شده';
}

/* Responsive design */
@media (max-width: 768px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .currency-tabs {
        flex-direction: column;
    }
    
    .tab-button {
        text-align: center;
    }
}

/* Admin styles */
.wrap .card {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 20px;
    margin: 20px 0;
}

.wrap .form-table th {
    width: 200px;
    padding: 20px 10px 20px 0;
}

.wrap .form-table td {
    padding: 15px 10px;
}

.wrap .wp-list-table th,
.wrap .wp-list-table td {
    padding: 12px 8px;
}

/* Checkout page styles */
.checkout-session-info {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.checkout-session-info h2 {
    color: var(--alo-primary-dark);
    margin-bottom: 15px;
}

.checkout-price {
    font-size: 24px;
    font-weight: bold;
    color: #e74c3c;
    margin: 10px 0;
}

.checkout-timer {
    font-size: 16px;
    color: #666;
    margin: 10px 0;
}

.checkout-expired {
    color: #dc3545;
    font-weight: bold;
}

/* Animation for price updates */
@keyframes priceUpdate {
    0% { background-color: #fff3cd; }
    50% { background-color: #d4edda; }
    100% { background-color: transparent; }
}

.price-amount.updating {
    animation: priceUpdate 1s ease-in-out;
}
