/* ============================================
   Canlı Altın Fiyatları Widget - Styles
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Container */
.gold-widget-container {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    width: 100% !important;
    max-width: 100% !important;
    /* Temadan gelen kısıtlamaları ezmek için */
    margin: 0 auto;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-sizing: border-box;
}

.gold-widget-container * {
    box-sizing: border-box;
}

/* Header */
.gold-widget-header {
    background: #043565;
    padding: 12px 20px;
    text-align: center;
}

.gold-widget-header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Tabs */
.gold-widget-tabs {
    display: flex;
    background: #f0f4f8;
    border-bottom: 2px solid #e2e8f0;
    padding: 0;
}

.gold-widget-tab {
    flex: 1;
    padding: 10px 14px;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.gold-widget-tab:hover {
    color: #1e40af;
    background: rgba(30, 64, 175, 0.05);
}

.gold-widget-tab.active {
    color: #ffffff;
    background: #043565;
    box-shadow: 0 2px 8px rgba(4, 53, 101, 0.3);
}

.gold-widget-tab .tab-icon {
    font-size: 16px;
}

/* Tab Content */
.gold-widget-tab-content {
    display: none;
    animation: fadeInUp 0.35s ease-out;
}

.gold-widget-tab-content.active {
    display: block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section Headers */
.gold-widget-section {
    margin-bottom: 0;
}

.gold-widget-section-header {
    padding: 8px 16px;
    background: linear-gradient(135deg, #f8fafc, #eef2f7);
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #e2e8f0;
    border-top: 1px solid #e2e8f0;
}

.section-icon {
    font-size: 16px;
}

/* Tables */
.gold-widget-table {
    width: 100% !important;
    max-width: 100% !important;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    font-size: 13px;
    table-layout: auto;
}

.gold-widget-table thead th {
    padding: 8px 14px;
    background: #043565;
    color: #ffffff;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    text-align: left;
    white-space: nowrap;
}

.gold-widget-table thead th.col-alis,
.gold-widget-table thead th.col-satis,
.gold-widget-table thead th.col-makas,
.gold-widget-table thead th.col-fiyat,
.gold-widget-table thead th.col-yuzde,
.gold-widget-table thead th.col-birim {
    text-align: center;
}

.gold-widget-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s ease;
}

.gold-widget-table tbody tr:hover {
    background: #f8fafc;
}

.gold-widget-table tbody tr:last-child {
    border-bottom: none;
}

.gold-widget-table td {
    padding: 7px 14px;
    vertical-align: middle;
}

.gold-widget-table td.col-alis,
.gold-widget-table td.col-satis,
.gold-widget-table td.col-makas,
.gold-widget-table td.col-fiyat,
.gold-widget-table td.col-yuzde,
.gold-widget-table td.col-birim {
    text-align: center;
}

/* Item Name */
.item-name {
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.arrow-icon {
    display: none !important;
}

/* Price Values */
.price-value {
    font-weight: 500;
    color: #0f172a;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

/* Price Change */
.price-with-change {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
}

.price-change {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.price-change.positive {
    color: #15803d;
    background: rgba(34, 197, 94, 0.12);
}

.price-change.negative {
    color: #dc2626;
    background: rgba(239, 68, 68, 0.12);
}

/* Bank specific */
.bank-name {
    font-weight: 600;
    color: #1e293b;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bank-time {
    font-size: 11px;
    font-weight: 400;
    color: #94a3b8;
}

.makas-value {
    font-weight: 500;
    color: #64748b;
    font-size: 13px;
}

/* No Data */
.no-data {
    text-align: center !important;
    padding: 32px 16px !important;
    color: #94a3b8;
    font-style: italic;
}

/* Footer */
.gold-widget-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-size: 11px;
    color: #94a3b8;
    gap: 16px;
    flex-wrap: wrap;
    text-align: center;
}

.update-time {
    font-variant-numeric: tabular-nums;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: #16a34a;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s infinite;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.85);
    }
}



/* Price flash animation */
@keyframes priceFlashGreen {
    0% {
        background-color: transparent;
    }

    25% {
        background-color: rgba(34, 197, 94, 0.2);
    }

    100% {
        background-color: transparent;
    }
}

@keyframes priceFlashRed {
    0% {
        background-color: transparent;
    }

    25% {
        background-color: rgba(239, 68, 68, 0.2);
    }

    100% {
        background-color: transparent;
    }
}

.gold-widget-row.flash-green {
    animation: priceFlashGreen 1.5s ease-out;
}

.gold-widget-row.flash-red {
    animation: priceFlashRed 1.5s ease-out;
}

/* Piyasa Widget — Altın/Gümüş ayırıcı */
.pw-section-divider {
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, #cbd5e1 20%, #94a3b8 50%, #cbd5e1 80%, transparent 100%);
    margin: 0;
}

/* Gümüş Widget */
.gumus-header {
    background: #043565;
}

/* Gümüş Section */
.gumus-section {
    margin-top: 0;
}

.gumus-section .gold-widget-section-header {
    background: linear-gradient(135deg, #f1f5f9, #e8ecf1);
}

/* Responsive */
@media (max-width: 600px) {
    .gold-widget-container {
        border-radius: 0;
        margin: 0;
        border-left: none;
        border-right: none;
    }

    .gold-widget-header {
        padding: 14px 16px;
    }

    .gold-widget-header h3 {
        font-size: 16px;
    }

    .gold-widget-tab {
        padding: 12px 10px;
        font-size: 12px;
    }

    .gold-widget-tab .tab-icon {
        display: none;
    }

    .gold-widget-table {
        font-size: 12px;
    }

    .gold-widget-table thead th {
        padding: 10px 8px;
        font-size: 11px;
    }

    .gold-widget-table td {
        padding: 9px 8px;
    }

    .price-value {
        font-size: 12px;
    }

    .gold-widget-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 10px 16px;
    }

    .item-name {
        font-size: 12px;
    }
}

@media (max-width: 400px) {

    .gold-widget-table thead th,
    .gold-widget-table td {
        padding: 8px 6px;
    }

    .price-value {
        font-size: 11px;
    }

    .gold-widget-table {
        font-size: 11px;
    }
}