/* ============================================
   AurumLX Gold Price Plugin - Theme Styles
   Color Scheme: Dark Blue, Gold, White
   Version: 1.0.2 (Fixed Column Layout)
   ============================================ */

/* Reset dan Base Styles */
.aurumlx-price-display,
.aurumlx-price-display * {
    box-sizing: border-box;
}

/* Base Variables */
:root {
    --aurumlx-primary: #1a365d;      /* Dark Blue */
    --aurumlx-secondary: #d4af37;    /* Gold */
    --aurumlx-accent: #2d3748;       /* Darker Blue */
    --aurumlx-light: #ffffff;        /* White */
    --aurumlx-gray: #e2e8f0;         /* Light Gray */
    --aurumlx-dark: #1a202c;         /* Very Dark Blue */
    --aurumlx-success: #38a169;      /* Green */
    --aurumlx-warning: #d69e2e;      /* Amber */
    --aurumlx-gradient: linear-gradient(135deg, #1a365d 0%, #2d3748 100%);
    --aurumlx-gold-gradient: linear-gradient(135deg, #d4af37 0%, #f7ef8a 100%);
}

/* ============================================
   MAIN CONTAINER
   ============================================ */
.aurumlx-price-display {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 100%;
    margin: 20px 0;
    width: 100%;
}

/* ============================================
   COLUMNS LAYOUT - FIXED
   ============================================ */

/* Container untuk kolom */
.aurumlx-price-columns {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: stretch;
    gap: 20px;
    margin-bottom: 15px;
    width: 100%;
}

/* Individual column */
.aurumlx-price-column {
    flex: 1;
    min-width: 0; /* Penting untuk flex-shrink */
}

/* ============================================
   PRICE CARD STYLES
   ============================================ */

.aurumlx-price-card {
    background: var(--aurumlx-light);
    border-radius: 4px;
    /*box-shadow: 0 4px 20px rgba(26, 54, 93, 0.1);*/
    border: 1px solid var(--aurumlx-gray);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.aurumlx-price-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(26, 54, 93, 0.15);
}

/* Card variations */
.aurumlx-sell-card {
    border-top: 4px solid var(--aurumlx-success);
}

.aurumlx-buy-card {
    border-top: 4px solid var(--aurumlx-secondary);
}

/* Card header */
.aurumlx-card-header {
    background: var(--aurumlx-gradient);
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.aurumlx-card-icon {
    font-size: 1.5em;
    background: rgba(255, 255, 255, 0.2);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aurumlx-card-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    flex: 1;
}

/* Card body */
.aurumlx-card-body {
    padding: 25px 20px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.aurumlx-price-value {
    font-size: 2.2em;
    font-weight: 700;
    color: var(--aurumlx-primary);
    margin-bottom: 8px;
    line-height: 1.2;
}

.aurumlx-price-unit {
    color: var(--aurumlx-accent);
    font-size: 0.9em;
    opacity: 0.8;
}

/* Card footer */
.aurumlx-card-footer {
    background: var(--aurumlx-gray);
    padding: 10px 20px;
    text-align: center;
}

.aurumlx-price-note {
    color: var(--aurumlx-accent);
    font-size: 0.85em;
    font-weight: 500;
}

/* ============================================
   UPDATE INFORMATION
   ============================================ */

.aurumlx-update-info {
    background: var(--aurumlx-light);
    border-radius: 4px;
    padding: 15px;
    margin-top: 10px;
    border: 1px solid var(--aurumlx-gray);
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    clear: both;
}

.aurumlx-update-icon {
    font-size: 1.5em;
    color: var(--aurumlx-secondary);
}

.aurumlx-update-text {
    flex-grow: 1;
}

.aurumlx-update-time {
    color: var(--aurumlx-primary);
    font-weight: 600;
}

.aurumlx-auto-refresh {
    text-align: right;
}

.aurumlx-refresh-badge {
    background: var(--aurumlx-gold-gradient);
    color: var(--aurumlx-primary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
}

/* ============================================
   CALCULATOR STYLES
   ============================================ */

.aurumlx-calculator-container {
    background: var(--aurumlx-light);
    border-radius: 4px;
    */box-shadow: 0 4px 20px rgba(26, 54, 93, 0.1);*/
    border: 1px solid var(--aurumlx-gray);
    overflow: hidden;
    width: 100%;
}

.aurumlx-calculator-header {
    background: var(--aurumlx-gradient);
    color: white;
    padding: 20px;
    text-align: center;
}

.aurumlx-calculator-header h3 {
    margin: 0 0 5px 0;
    font-size: 1.5em;
}

.aurumlx-calculator-subtitle {
    opacity: 0.9;
    font-size: 0.9em;
}

.aurumlx-calculator-body {
    padding: 25px;
}

.aurumlx-input-group {
    margin-bottom: 25px;
}

.aurumlx-input-group label {
    display: block;
    color: var(--aurumlx-primary);
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.aurumlx-input-icon {
    font-size: 1.2em;
}

.aurumlx-input-wrapper {
    position: relative;
}

.aurumlx-input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 2px solid var(--aurumlx-gray);
    border-radius: 4px;
    font-size: 1.1em;
    font-weight: 600;
    color: var(--aurumlx-primary);
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.aurumlx-input:focus {
    outline: none;
    border-color: var(--aurumlx-secondary);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

.aurumlx-input-suffix {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--aurumlx-secondary);
    font-weight: 700;
    font-size: 1em;
}

.aurumlx-weight-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.aurumlx-preset-btn {
    background: var(--aurumlx-gray);
    border: 1px solid var(--aurumlx-gray);
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--aurumlx-primary);
}

.aurumlx-preset-btn:hover {
    background: var(--aurumlx-secondary);
    border-color: var(--aurumlx-secondary);
    color: var(--aurumlx-light);
}

.aurumlx-preset-btn.active {
    background: var(--aurumlx-secondary);
    border-color: var(--aurumlx-secondary);
    color: var(--aurumlx-light);
}

.aurumlx-calc-button {
    background: var(--aurumlx-gold-gradient);
    color: var(--aurumlx-primary);
    border: none;
    border-radius: 4px;
    padding: 15px 25px;
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.aurumlx-calc-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
}

.aurumlx-button-icon {
    font-size: 1.2em;
}

.aurumlx-result-container {
    background: var(--aurumlx-gray);
    border-radius: 4px;
    margin-top: 25px;
    overflow: hidden;
}

.aurumlx-result-header {
    background: var(--aurumlx-accent);
    color: white;
    padding: 12px 20px;
}

.aurumlx-result-header h4 {
    margin: 0;
    font-size: 1.1em;
}

.aurumlx-result-body {
    padding: 20px;
}

.aurumlx-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(26, 54, 93, 0.1);
}

.aurumlx-result-item:last-child {
    border-bottom: none;
}

.aurumlx-result-label {
    color: var(--aurumlx-primary);
    font-weight: 600;
}

.aurumlx-result-value {
    color: var(--aurumlx-accent);
    font-weight: 700;
    font-size: 1.1em;
}

.aurumlx-total-cost .aurumlx-result-value {
    color: var(--aurumlx-secondary);
    font-size: 1.3em;
}

.aurumlx-result-note {
    margin-top: 15px;
    text-align: center;
    color: var(--aurumlx-accent);
    opacity: 0.8;
}

/* Loading Spinner */
.aurumlx-loading {
    text-align: center;
    padding: 20px;
    color: var(--aurumlx-primary);
}

.aurumlx-spinner {
    border: 3px solid var(--aurumlx-gray);
    border-top: 3px solid var(--aurumlx-secondary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: aurumlx-spin 1s linear infinite;
    margin: 0 auto 15px auto;
}

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

/* Error Messages */
.aurumlx-error {
    background: #fed7d7;
    color: #9b2c2c;
    padding: 12px 15px;
    border-radius: 8px;
    border-left: 4px solid #e53e3e;
    margin: 10px 0;
}

/* ============================================
   COMPARISON STYLES
   ============================================ */

.aurumlx-comparison-container {
    background: var(--aurumlx-light);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(26, 54, 93, 0.1);
    border: 1px solid var(--aurumlx-gray);
    overflow: hidden;
    width: 100%;
}

.aurumlx-comparison-header {
    background: var(--aurumlx-gradient);
    color: white;
    padding: 20px;
    text-align: center;
}

.aurumlx-comparison-header h3 {
    margin: 0 0 5px 0;
}

.aurumlx-comparison-subtitle {
    opacity: 0.9;
    font-size: 0.9em;
    margin: 0;
}

.aurumlx-comparison-body {
    padding: 25px;
}

.aurumlx-spread-meter {
    margin-bottom: 30px;
}

.aurumlx-meter-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.aurumlx-meter-label {
    text-align: center;
    flex: 1;
    color: var(--aurumlx-primary);
    font-weight: 600;
}

.aurumlx-buy-label strong {
    color: var(--aurumlx-secondary);
}

.aurumlx-sell-label strong {
    color: var(--aurumlx-success);
}

.aurumlx-spread-label strong {
    color: var(--aurumlx-primary);
}

.aurumlx-meter-bar {
    height: 40px;
    background: var(--aurumlx-gray);
    border-radius: 20px;
    display: flex;
    overflow: hidden;
    position: relative;
}

.aurumlx-meter-fill {
    background: var(--aurumlx-secondary);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--aurumlx-primary);
    font-weight: 700;
    font-size: 0.9em;
}

.aurumlx-meter-fill-sell {
    background: var(--aurumlx-success);
    color: white;
}

.aurumlx-meter-spread {
    background: var(--aurumlx-primary);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.9em;
}

.aurumlx-spread-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.aurumlx-detail-card {
    background: var(--aurumlx-gray);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.aurumlx-detail-icon {
    font-size: 2em;
    color: var(--aurumlx-secondary);
}

.aurumlx-detail-content h5 {
    margin: 0 0 5px 0;
    color: var(--aurumlx-primary);
    font-size: 1em;
}

.aurumlx-detail-value {
    color: var(--aurumlx-accent);
    font-weight: 700;
    font-size: 1.3em;
    margin-bottom: 5px;
}

.aurumlx-detail-content small {
    color: var(--aurumlx-accent);
    opacity: 0.8;
    font-size: 0.85em;
}

.aurumlx-insights {
    background: var(--aurumlx-gray);
    border-radius: 8px;
    padding: 20px;
}

.aurumlx-insights h4 {
    color: var(--aurumlx-primary);
    margin-top: 0;
    margin-bottom: 15px;
}

.aurumlx-insights-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.aurumlx-insights-list li {
    padding: 8px 0;
    color: var(--aurumlx-accent);
    display: flex;
    align-items: center;
    gap: 10px;
}

.aurumlx-insights-list li:before {
    content: "✓";
    color: var(--aurumlx-success);
    font-weight: bold;
}

/* ============================================
   RESPONSIVE DESIGN - FIXED
   ============================================ */

/* Desktop (default) - Columns berdampingan */
@media (min-width: 769px) {
    .aurumlx-price-columns {
        flex-direction: row;
        flex-wrap: nowrap;
    }
    
    .aurumlx-price-column {
        flex: 0 0 calc(50% - 10px);
        max-width: calc(50% - 10px);
    }
}

/* Tablet */
@media (max-width: 1024px) and (min-width: 769px) {
    .aurumlx-price-value {
        font-size: 2em;
    }
    
    .aurumlx-price-columns {
        gap: 15px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    /* Price columns untuk mobile - bertumpuk */
    .aurumlx-price-columns {
        flex-direction: column;
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .aurumlx-price-column {
        flex: 1 1 100%;
        width: 100%;
        max-width: 100%;
    }
    
    /* Price values lebih kecil di mobile */
    .aurumlx-price-value {
        font-size: 1.8em;
    }
    
    /* Update info kolom di mobile */
    .aurumlx-update-info {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    /* Spread details kolom di mobile */
    .aurumlx-spread-details {
        grid-template-columns: 1fr;
    }
    
    /* Meter labels kolom di mobile */
    .aurumlx-meter-labels {
        flex-direction: column;
        gap: 10px;
    }
    
    /* Calculator adjustments */
    .aurumlx-calculator-body {
        padding: 20px;
    }
    
    /* Comparison adjustments */
    .aurumlx-comparison-body {
        padding: 20px;
    }
    
    /* Weight presets stacking di mobile */
    .aurumlx-weight-presets {
        justify-content: center;
    }
}

/* ============================================
   ADMIN STYLES
   ============================================ */

.aurumlx-admin-wrap {
    background: #f7fafc;
    padding: 20px;
    border-radius: 8px;
}

.aurumlx-admin-card {
    background: white;
    border: 1px solid var(--aurumlx-gray);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* ============================================
   SIZE VARIATIONS
   ============================================ */

.aurumlx-size-small .aurumlx-price-value {
    font-size: 1.5em;
}

.aurumlx-size-large .aurumlx-price-value {
    font-size: 2.8em;
}

.aurumlx-size-large .aurumlx-card-header {
    padding: 20px;
}

.aurumlx-size-large .aurumlx-card-body {
    padding: 30px 20px;
}

/* ============================================
   ANIMATIONS
   ============================================ */

.aurumlx-price-card.refreshing {
    animation: aurumlx-pulse 1.5s infinite;
}

@keyframes aurumlx-pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* ============================================
   FALLBACK DAN OVERRIDE
   ============================================ */

/* Force layout untuk compatibility */
.aurumlx-price-columns {
    display: flex !important;
}

/* Clear floats */
.aurumlx-price-display:after {
    content: "";
    display: table;
    clear: both;
}

/* Ensure no float issues */
.aurumlx-price-column {
    float: none;
}

/* Grid fallback */
@supports (display: grid) {
    .aurumlx-price-columns {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-gap: 20px;
    }
    
    @media (max-width: 768px) {
        .aurumlx-price-columns {
            grid-template-columns: 1fr;
        }
    }
}