
/* Frontend Styles for Live Gold Coin Prices Plugin */

/* Base styles for all price displays */
.lgcp-live-price-container,
.lgcp-single-price,
.lgcp-price-table-container,
.lgcp-calculator-container {
    direction: rtl;
    text-align: right;
    width: 100%;
    box-sizing: border-box;
}

/* Error message styles */
.lgcp-error-message {
    background-color: #fff5f5;
    border: 1px solid #ffcccc;
    border-radius: 4px;
    padding: 15px;
    margin: 15px 0;
    color: #d32f2f;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
}

/* Cached data notice styles */
.lgcp-cached-notice {
    background-color: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 15px;
    color: #ff8f00;
    font-size: 13px;
    line-height: 1.4;
    text-align: center;
}

/* WooCommerce info notice for cached data */
.woocommerce-info.lgcp-cached-data-notice {
    background-color: #fff8e1;
    border-top-color: #ff8f00;
    color: #333;
}

/* Currency info styles */
.currency-info {
    font-size: 12px;
    color: #666;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #ddd;
    text-align: center;
}

/* Price Card Base Styles */
.price-card {
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    text-align: right;
    max-width: 480px;
    margin: 0 auto;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.625rem;
    padding-bottom: 0.625rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.price-row:not(:last-child) {
    border-bottom-width: 1px;
}

.total-price-row {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top-width: 2px;
    font-size: 1rem;
    line-height: 1.5rem;
    font-weight: 700;
}

.last-updated {
    font-size: 0.75rem;
    line-height: 1rem;
    margin-bottom: 1rem;
    text-align: center;
}

.detail-value {
    font-weight: 600;
}

/* Theme 1: Classic Gold & Dark */
.theme-classic-gold-dark {
    background-color: #1f2937;
}

.theme-classic-gold-dark .last-updated {
    color: #d1d5db;
}

.theme-classic-gold-dark .price-row {
    border-color: #374151;
}

.theme-classic-gold-dark .detail-label {
    color: #d1d5db;
}

.theme-classic-gold-dark .detail-value {
    color: #d1d5db;
}

.theme-classic-gold-dark .total-price-row {
    border-color: #4b5563;
}

.theme-classic-gold-dark .total-price-row .detail-label {
    color: #d1d5db;
}

.theme-classic-gold-dark .total-price-row .detail-value {
    color: #d1d5db;
}

/* Theme 2: Bright Gold & White */
.theme-bright-gold-white {
    background-color: #ffffff;
}

.theme-bright-gold-white .price-row {
    border-color: #e5e7eb;
}

.theme-bright-gold-white .detail-label {
    color: #374151;
}

.theme-bright-gold-white .detail-value {
    color: #ca8a04;
}

.theme-bright-gold-white .total-price-row {
    border-color: #d1d5db;
}

.theme-bright-gold-white .total-price-row .detail-label {
    color: #111827;
}

.theme-bright-gold-white .total-price-row .detail-value {
    color: #ca8a04;
}

/* Theme 3: Luxury Black & Gold Gradient */
.theme-luxury-black-gold {
    background-color: #000000;
}

.theme-luxury-black-gold .last-updated {
    color: #a1a1aa;
}

.theme-luxury-black-gold .price-row {
    border-color: #3f3f46;
}

.theme-luxury-black-gold .detail-label {
    color: #e4e4e7;
}

.theme-luxury-black-gold .detail-value {
    background: linear-gradient(45deg, #F7C85E, #FFEBA4, #D4A24C);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.theme-luxury-black-gold .total-price-row {
    border-color: #52525b;
}

.theme-luxury-black-gold .total-price-row .detail-label {
    color: #fafafa;
}

/* Theme 4: Elegant White & Rose Gold */
.theme-elegant-white-rose-gold {
    background-color: #fff7f2;
}

.theme-elegant-white-rose-gold .last-updated {
    color: #7f6d63;
}

/* Usage Levels Table Styles */
.lgcp-usage-levels {
    margin-top: 2rem;
    padding: 1.5rem;
    border-radius: 0.75rem;
    background-color: #1a1a1a; /* Dark background */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    color: #f0f0f0; /* Light text for general info */
    text-align: right;
    direction: rtl;
}

.lgcp-usage-levels h3 {
    color: #fde047; /* Gold color for heading */
    text-align: center;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.lgcp-usage-levels p {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    text-align: center;
    color: #ccc;
}

.lgcp-tier-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.lgcp-tier-table th,
.lgcp-tier-table td {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Subtle separator */
    text-align: right;
    font-size: 0.9rem;
}

.lgcp-tier-table thead th {
    background-color: #2a2a2a; /* Slightly lighter dark for header */
    color: #fde047; /* Gold color for header text */
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.lgcp-tier-table tbody tr:last-child td {
    border-bottom: none;
}

.lgcp-tier-table tbody td {
    color: #e0e0e0; /* Light gray for body text */
}

.lgcp-tier-table tbody tr:nth-child(odd) {
    background-color: #222222; /* Alternate row background for readability */
}

.lgcp-tier-table tbody tr:nth-child(even) {
    background-color: #1a1a1a;
}

.lgcp-tier-table tbody td:first-child {
    font-weight: 600;
    color: #fde047; /* Gold for tier names */
}

/* Responsive adjustments for the new table */
@media (max-width: 768px) {
    .lgcp-usage-levels {
        padding: 1rem;
        margin: 1rem;
    }
    .lgcp-usage-levels h3 {
        font-size: 1.25rem;
    }
    .lgcp-tier-table th,
    .lgcp-tier-table td {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
    }
}

.theme-elegant-white-rose-gold .price-row {
    border-color: #e0d1c8;
}

.theme-elegant-white-rose-gold .detail-label {
    color: #5c4033;
}

.theme-elegant-white-rose-gold .detail-value {
    color: #b76e79;
}

.theme-elegant-white-rose-gold .total-price-row {
    border-color: #d3b8ae;
}

.theme-elegant-white-rose-gold .total-price-row .detail-label {
    color: #4a3329;
}

.theme-elegant-white-rose-gold .total-price-row .detail-value {
    color: #b76e79;
}

/* Theme 5: Modern Silver & Dark Blue */
.theme-silver-dark-blue {
    background-color: #1e3a8a;
}

.theme-silver-dark-blue .last-updated {
    color: #93c5fd;
}

.theme-silver-dark-blue .price-row {
    border-color: #1d4ed8;
}

.theme-silver-dark-blue .detail-label {
    color: #bfdbfe;
}

.theme-silver-dark-blue .detail-value {
    color: #e5e7eb;
}

.theme-silver-dark-blue .total-price-row {
    border-color: #2563eb;
}

.theme-silver-dark-blue .total-price-row .detail-label {
    color: #dbeafe;
}

.theme-silver-dark-blue .total-price-row .detail-value {
    color: #f9fafb;
}

/* Theme 6: Sleek Silver & White */
.theme-sleek-silver-white {
    background-color: #ffffff;
}

.theme-sleek-silver-white .last-updated {
    color: #6b7280;
}

.theme-sleek-silver-white .price-row {
    border-color: #e5e7eb;
}

.theme-sleek-silver-white .detail-label {
    color: #4b5563;
}

.theme-sleek-silver-white .detail-value {
    color: #9ca3af;
}

.theme-sleek-silver-white .total-price-row {
    border-color: #d1d5db;
}

.theme-sleek-silver-white .total-price-row .detail-label {
    color: #1f2937;
}

.theme-sleek-silver-white .total-price-row .detail-value {
    color: #757575;
}

/* Theme 7: Gradient Gold Background & Black Text */
.theme-gradient-gold-bg-black-text {
    background: linear-gradient(135deg, #DAA520 0%, #FFEC8B 30%, #B8860B 60%, #CDAD00 100%);
}

.theme-gradient-gold-bg-black-text .last-updated {
    color: #333333;
    opacity: 0.8;
}

.theme-gradient-gold-bg-black-text .price-row {
    border-color: #b8860b;
    border-color: rgba(184, 134, 11, 0.5);
}

.theme-gradient-gold-bg-black-text .detail-label {
    color: #1a1a1a;
}

.theme-gradient-gold-bg-black-text .detail-value {
    color: #000000;
}

.theme-gradient-gold-bg-black-text .total-price-row {
    border-color: rgba(184, 134, 11, 0.7);
}

.theme-gradient-gold-bg-black-text .total-price-row .detail-label {
    color: #000000;
}

.theme-gradient-gold-bg-black-text .total-price-row .detail-value {
    color: #000000;
}

/* Theme 8: Minimalist Light Gray & Gold */
.theme-minimalist-gray-gold {
    background-color: #f3f4f6;
}

.theme-minimalist-gray-gold .last-updated {
    color: #6b7280;
}

.theme-minimalist-gray-gold .price-row {
    border-color: #d1d5db;
}

.theme-minimalist-gray-gold .detail-label {
    color: #4b5563;
}

.theme-minimalist-gray-gold .detail-value {
    color: #374151;
}

.theme-minimalist-gray-gold .total-price-row {
    border-color: #9ca3af;
}

.theme-minimalist-gray-gold .total-price-row .detail-label {
    color: #1f2937;
}

.theme-minimalist-gray-gold .total-price-row .detail-value {
    color: #ca8a04;
}

/* Theme 9: Dark Teal & Champagne Gold */
.theme-dark-teal-champagne {
    background-color: #0d5e59;
}

.theme-dark-teal-champagne .last-updated {
    color: #a2d5d1;
}

.theme-dark-teal-champagne .price-row {
    border-color: #1e7e78;
}

.theme-dark-teal-champagne .detail-label {
    color: #cce8e6;
}

.theme-dark-teal-champagne .detail-value {
    color: #f1e5ac;
}

.theme-dark-teal-champagne .total-price-row {
    border-color: #3ba39c;
}

.theme-dark-teal-champagne .total-price-row .detail-label {
    color: #e6f5f3;
}

.theme-dark-teal-champagne .total-price-row .detail-value {
    color: #f1e5ac;
}

/* Theme 10: Royal Purple & Gold */
.theme-royal-purple-gold {
    background-color: #4c1d95;
}

.theme-royal-purple-gold .last-updated {
    color: #c4b5fd;
}

.theme-royal-purple-gold .price-row {
    border-color: #5b21b6;
}

.theme-royal-purple-gold .detail-label {
    color: #ddd6fe;
}

.theme-royal-purple-gold .detail-value {
    color: #facc15;
}

.theme-royal-purple-gold .total-price-row {
    border-color: #6d28d9;
}

.theme-royal-purple-gold .total-price-row .detail-label {
    color: #ede9fe;
}

.theme-royal-purple-gold .total-price-row .detail-value {
    color: #facc15;
}

/* Single Price Display */
.lgcp-single-price {
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
    text-align: center;
}

.lgcp-single-price .price-display {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.lgcp-single-price .price-unit {
    font-size: 0.875rem;
    opacity: 0.8;
    margin-right: 0.5rem;
}

.lgcp-single-price .price-source,
.lgcp-single-price .price-update-time {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 0.25rem;
}

/* Price Table Styles */
.lgcp-price-table-container {
    margin: 1rem 0;
}

.lgcp-price-table-container .table-update-time {
    text-align: center;
    font-size: 0.75rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.price-table {
    width: 100%;
    border-radius: 0.5rem;
    overflow: hidden;
}

.table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    font-weight: 600;
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.1);
}

.table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.table-row:last-child {
    border-bottom: none;
}

.row-item {
    color: #d1d5db;
}

.row-price {
    color: #fde047;
}

.row-item .item-unit {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-right: 0.5rem;
}


/* Live Price Badge */
.lgcp-live-price-badge {
    background: linear-gradient(45deg, #fbbf24, #f59e0b);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 600;
    font-size: 0.875rem;
    display: inline-block;
}

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

.lgcp-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 #3498db;
    border-radius: 50%;
    animation: lgcp-spin 1s linear infinite;
}

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

/* Error States */
.lgcp-error {
    background-color: #fee2e2;
    color: #dc2626;
    padding: 1rem;
    border-radius: 0.375rem;
    border: 1px solid #fecaca;
    margin: 1rem 0;
    text-align: center;
}

/* Success States */
.lgcp-success {
    background-color: #dcfce7;
    color: #16a34a;
    padding: 1rem;
    border-radius: 0.375rem;
    border: 1px solid #bbf7d0;
    margin: 1rem 0;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .price-card {
        padding: 1rem;
        margin: 0.5rem;
    }
    
    .price-row {
        font-size: 0.8rem;
        padding: 0.5rem 0;
    }
    
    .table-header,
    .table-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .table-header > div,
    .table-row > div {
        padding: 0.25rem 0;
    }
    
    .lgcp-calculator-container {
        margin: 1rem;
        padding: 1rem;
    }
    
    .calculator-inputs {
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .price-card {
        padding: 0.75rem;
    }
    
    .total-price-row {
        font-size: 0.875rem;
    }
    
    .lgcp-single-price .price-display {
        font-size: 1.25rem;
    }
}

/* Print Styles */
@media print {
    .lgcp-live-price-container,
    .lgcp-single-price,
    .lgcp-price-table-container {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
    }
    
    .calculate-btn {
        display: none;
    }
}
