/* ===== Gold Today Plugin CSS ===== */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;700;900&display=swap');

.gt-widget, .gt-full-platform {
    font-family: 'Tajawal', sans-serif;
    direction: rtl;
    text-align: right;
}

/* === TICKER === */
.gt-ticker {
    background: #1A1A2E;
    border-bottom: 1px solid #232340;
    padding: 10px 0;
    overflow: hidden;
    width: 100%;
}
.gt-ticker-inner {
    display: flex;
    gap: 0;
    white-space: nowrap;
    animation: gt-ticker 40s linear infinite;
}
.gt-ticker-inner:hover { animation-play-state: paused; }
.gt-ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 20px;
}
.gt-ticker-label { color: #6B7280; font-size: 12px; }
.gt-ticker-price { color: #D4AF37; font-weight: 700; font-size: 14px; }
.gt-ticker-change-up   { color: #22C55E; font-size: 12px; }
.gt-ticker-change-down { color: #EF4444; font-size: 12px; }
.gt-ticker-sep { color: #232340; margin: 0 8px; }

@keyframes gt-ticker {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* === CARDS === */
.gt-widget {
    background: #1A1A2E;
    border: 1px solid #232340;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    color: #F1F1F1;
}

.gt-card-title {
    font-size: 14px;
    font-weight: 700;
    color: #D4AF37;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* === PRICES TABLE === */
.gt-prices-table { width: 100%; border-collapse: collapse; }
.gt-prices-table th {
    color: #6B7280;
    font-size: 11px;
    padding: 8px 4px;
    border-bottom: 1px solid #232340;
}
.gt-prices-table td {
    padding: 10px 4px;
    border-bottom: 1px solid #232340;
    font-size: 13px;
}
.gt-price-gold   { color: #D4AF37; font-weight: 700; }
.gt-price-silver { color: #9CA3AF; font-weight: 700; }
.gt-change-up    { color: #22C55E; }
.gt-change-down  { color: #EF4444; }

/* === CURRENCY SELECTOR === */
.gt-currency-select {
    background: #232340;
    border: 1px solid #374151;
    color: #F1F1F1;
    padding: 6px 12px;
    border-radius: 8px;
    font-family: 'Tajawal', sans-serif;
    font-size: 13px;
    margin-bottom: 12px;
}

/* === CALCULATOR === */
.gt-calc-input {
    width: 100%;
    background: #232340;
    border: 1px solid #374151;
    color: #F1F1F1;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Tajawal', sans-serif;
    margin-bottom: 10px;
    box-sizing: border-box;
}
.gt-calc-result {
    background: linear-gradient(135deg, rgba(212,175,55,0.1), #232340);
    border: 1px solid rgba(212,175,55,0.2);
    border-radius: 12px;
    padding: 16px;
    margin-top: 12px;
}
.gt-calc-result-grams { font-size: 28px; font-weight: 900; color: #D4AF37; }
.gt-calc-result-label { font-size: 13px; color: #9CA3AF; }

/* === FORECAST === */
.gt-forecast-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}
.gt-forecast-card {
    background: #232340;
    border-radius: 12px;
    padding: 14px;
    text-align: center;
}
.gt-forecast-price { font-size: 22px; font-weight: 900; color: #D4AF37; }
.gt-forecast-label { font-size: 11px; color: #6B7280; margin-bottom: 4px; }
.gt-forecast-dir-up   { color: #22C55E; }
.gt-forecast-dir-down { color: #EF4444; }
.gt-confidence-bar {
    height: 6px;
    background: #374151;
    border-radius: 3px;
    overflow: hidden;
    margin: 8px 0 4px;
}
.gt-confidence-fill { height: 100%; background: #D4AF37; border-radius: 3px; transition: width 0.6s; }

/* === SENTIMENT GAUGE === */
.gt-gauge-wrap { text-align: center; }
.gt-gauge-svg  { width: 140px; margin: 0 auto; display: block; }
.gt-gauge-score { font-size: 32px; font-weight: 900; color: #D4AF37; }
.gt-sentiment-factors { margin-top: 12px; }
.gt-sentiment-factor {
    font-size: 12px;
    color: #9CA3AF;
    padding: 4px 0;
    border-bottom: 1px solid #232340;
}

/* === CHAT === */
.gt-chat { max-width: 100%; }
#gt-chat-messages {
    min-height: 280px;
    max-height: 380px;
    overflow-y: auto;
    margin-bottom: 12px;
    padding: 4px 0;
}
.gt-msg {
    display: flex;
    margin-bottom: 10px;
}
.gt-msg-user { justify-content: flex-start; }
.gt-msg-ai   { justify-content: flex-end; }
.gt-msg-bubble {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 13px;
    line-height: 1.6;
}
.gt-msg-user .gt-msg-bubble {
    background: #232340;
    color: #D4AF37;
}
.gt-msg-ai .gt-msg-bubble {
    background: rgba(212,175,55,0.1);
    border: 1px solid rgba(212,175,55,0.2);
    color: #F1F1F1;
}
.gt-chat-input-wrap {
    display: flex;
    gap: 8px;
}
#gt-chat-input {
    flex: 1;
    background: #232340;
    border: 1px solid #374151;
    color: #F1F1F1;
    padding: 10px 14px;
    border-radius: 10px;
    font-family: 'Tajawal', sans-serif;
    font-size: 13px;
}
#gt-chat-send {
    background: #D4AF37;
    color: #0F0F1A;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Tajawal', sans-serif;
}
#gt-chat-send:hover { background: #B8960C; }

/* === LOADING === */
.gt-loading-state {
    text-align: center;
    padding: 30px;
    color: #6B7280;
    font-size: 13px;
}
.gt-spinner {
    display: inline-block;
    width: 20px; height: 20px;
    border: 2px solid #232340;
    border-top-color: #D4AF37;
    border-radius: 50%;
    animation: gt-spin 0.8s linear infinite;
    margin-left: 6px;
    vertical-align: middle;
}
@keyframes gt-spin { to { transform: rotate(360deg); } }

/* === BUTTON === */
.gt-btn {
    background: #D4AF37;
    color: #0F0F1A;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Tajawal', sans-serif;
    font-size: 13px;
    transition: background 0.2s;
}
.gt-btn:hover    { background: #B8960C; }
.gt-btn-outline {
    background: transparent;
    border: 1px solid #D4AF37;
    color: #D4AF37;
}

/* === GRID === */
.gt-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 640px) {
    .gt-grid-2 { grid-template-columns: 1fr; }
    .gt-forecast-grid { grid-template-columns: 1fr; }
}

/* === NO API KEY === */
.gt-no-api {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.3);
    border-radius: 12px;
    padding: 16px;
    color: #FCA5A5;
    font-size: 13px;
    text-align: center;
}
