/* Currency Rate Plugin v1.1 — Redesigned */

/* ======================= GLOBAL ======================= */
.cr-faded { opacity:0.45; }
.cr-error { background:#fef2f2; color:#991b1b; padding:16px 20px; border-radius:10px; border:1px solid #fecaca; }
.cr-updated-badge { font-size:12px; color:#6b7280; background:#f3f4f6; padding:4px 12px; border-radius:20px; white-space:nowrap; }

/* ======================= RATE TABLE ======================= */
.cr-table-wrapper { margin:24px 0; }
.cr-table-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:16px; flex-wrap:wrap; gap:10px; }
.cr-table-title { font-size:22px; font-weight:700; color:#1f2937; margin:0; }
.cr-table-responsive { overflow-x:auto; border-radius:12px; box-shadow:0 1px 3px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04); }

.cr-rate-table { width:100%; border-collapse:collapse; }
.cr-rate-table thead tr { background:#1e293b; }
.cr-rate-table thead th { padding:14px 18px; text-align:left; font-weight:600; font-size:13px; color:#e2e8f0; text-transform:uppercase; letter-spacing:0.5px; }
.cr-rate-table thead th:nth-child(3), .cr-rate-table thead th:nth-child(4) { text-align:right; }
.cr-rate-table tbody tr { background:#fff; border-bottom:1px solid #f1f5f9; transition:all 0.15s ease; }
.cr-rate-table tbody tr:nth-child(even) { background:#f8fafc; }
.cr-rate-table tbody tr:hover { background:#eff6ff; }
.cr-rate-table tbody tr.cr-clickable-row:hover { background:#dbeafe; box-shadow:0 2px 8px rgba(59,130,246,0.15); transform:translateX(2px); }
.cr-rate-table td { padding:12px 18px; font-size:14px; color:#374151; }

.cr-currency-cell { min-width:200px; }
.cr-currency-link { display:inline-flex; align-items:center; text-decoration:none; color:#1f2937; gap:10px; font-weight:500; }
a.cr-currency-link:hover { color:#2563eb; }
.cr-flag { font-size:22px; line-height:1; }
.cr-code-cell { font-weight:700; color:#475569; font-size:13px; letter-spacing:0.5px; }
.cr-rate-cell { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
.cr-rate-num { font-weight:600; color:#1e293b; }
.cr-rate-cur { font-size:12px; color:#94a3b8; margin-left:2px; }

/* ======================= PAIR DETAIL PAGE ======================= */
.cr-pair-wrapper { max-width:100%; margin:20px 0; }

/* Hero Card */
.cr-hero-card { background:linear-gradient(135deg,#1e293b 0%,#334155 50%,#1e293b 100%); border-radius:16px; padding:36px; color:#fff; text-align:center; margin-bottom:28px; position:relative; overflow:hidden; }
.cr-hero-card::before { content:''; position:absolute; top:-50%; right:-30%; width:60%; height:200%; background:radial-gradient(ellipse, rgba(59,130,246,0.15) 0%, transparent 70%); pointer-events:none; }
.cr-hero-flags { display:flex; align-items:center; justify-content:center; gap:16px; margin-bottom:12px; }
.cr-hero-flag { font-size:44px; line-height:1; }
.cr-hero-arrow { font-size:24px; color:#60a5fa; }
.cr-hero-pair-name { font-size:16px; color:#cbd5e1; margin-bottom:20px; }
.cr-hero-code { color:#94a3b8; }
.cr-hero-rate { margin-bottom:20px; }
.cr-hero-label { display:block; font-size:14px; color:#94a3b8; margin-bottom:6px; }
.cr-hero-value { display:block; font-size:42px; font-weight:800; letter-spacing:-1.5px; line-height:1.1; }
.cr-hero-rates-row { display:flex; justify-content:center; gap:16px; margin-bottom:16px; }
.cr-hero-rate-pill { padding:10px 24px; border-radius:10px; text-align:center; min-width:140px; }
.cr-pill-buy { background:rgba(34,197,94,0.15); border:1px solid rgba(34,197,94,0.3); }
.cr-pill-sell { background:rgba(239,68,68,0.15); border:1px solid rgba(239,68,68,0.3); }
.cr-pill-label { display:block; font-size:11px; text-transform:uppercase; letter-spacing:1px; color:#94a3b8; margin-bottom:4px; }
.cr-pill-buy .cr-pill-value { color:#4ade80; font-weight:700; font-size:18px; }
.cr-pill-sell .cr-pill-value { color:#f87171; font-weight:700; font-size:18px; }
.cr-hero-reverse { font-size:14px; color:#64748b; margin-bottom:8px; }
.cr-hero-updated { font-size:12px; color:#475569; }

/* Conversion Tables Grid */
.cr-tables-grid { display:grid; grid-template-columns:1fr 1fr; gap:20px; margin-bottom:28px; }
.cr-table-card { background:#fff; border-radius:12px; box-shadow:0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.03); overflow:hidden; }
.cr-table-card-title { margin:0; padding:14px 18px; background:#f8fafc; font-size:15px; font-weight:700; color:#1e293b; border-bottom:1px solid #e2e8f0; }

.cr-conv-table { width:100%; border-collapse:collapse; }
.cr-conv-table thead tr { background:#1e293b; }
.cr-conv-table thead th { padding:10px 18px; font-size:13px; color:#e2e8f0; text-align:left; font-weight:600; }
.cr-conv-table tbody tr { border-bottom:1px solid #f1f5f9; }
.cr-conv-table tbody tr:nth-child(even) { background:#fafbfc; }
.cr-conv-table tbody tr:hover { background:#eff6ff; }
.cr-conv-table td { padding:9px 18px; font-size:14px; color:#374151; font-variant-numeric:tabular-nums; }
.cr-conv-table td:first-child { font-weight:500; color:#64748b; }
.cr-conv-table td:last-child { font-weight:600; color:#1e293b; text-align:right; }

/* Info Cards Grid */
.cr-info-grid { display:grid; grid-template-columns:1fr 1fr; gap:20px; margin-bottom:28px; }
.cr-info-card { background:#fff; border-radius:12px; box-shadow:0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.03); padding:24px; text-align:center; }
.cr-info-card-flag { font-size:48px; line-height:1; margin-bottom:10px; }
.cr-info-card h3 { margin:0 0 16px; font-size:18px; color:#1e293b; font-weight:700; }
.cr-info-details { text-align:left; }
.cr-info-row { display:flex; justify-content:space-between; padding:8px 0; border-bottom:1px solid #f1f5f9; }
.cr-info-row:last-child { border-bottom:none; }
.cr-info-label { font-size:13px; color:#64748b; font-weight:500; }
.cr-info-val { font-size:14px; color:#1e293b; font-weight:600; }

/* Summary Bar */
.cr-summary-bar { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; margin-bottom:28px; }
.cr-summary-item { background:#f8fafc; border:1px solid #e2e8f0; border-radius:10px; padding:16px; text-align:center; }
.cr-summary-label { display:block; font-size:12px; text-transform:uppercase; letter-spacing:0.5px; color:#64748b; margin-bottom:6px; font-weight:600; }
.cr-summary-val { display:block; font-size:15px; color:#1e293b; font-weight:700; }

/* ======================= CONVERTER ======================= */
.cr-converter-card { background:#fff; border-radius:14px; box-shadow:0 1px 3px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.06); overflow:hidden; max-width:520px; margin:28px 0; }
.cr-converter-header { background:#1e293b; padding:16px 24px; }
.cr-converter-header h3 { margin:0; color:#fff; font-size:18px; font-weight:700; }
.cr-converter-body { padding:24px; }

.cr-conv-field { margin-bottom:16px; }
.cr-conv-field label { display:block; font-size:12px; font-weight:600; text-transform:uppercase; letter-spacing:0.5px; color:#64748b; margin-bottom:6px; }
.cr-conv-field input, .cr-conv-field select { width:100%; padding:12px 14px; border:2px solid #e2e8f0; border-radius:10px; font-size:15px; box-sizing:border-box; background:#f8fafc; color:#1e293b; transition:border-color 0.2s; }
.cr-conv-field input:focus, .cr-conv-field select:focus { border-color:#3b82f6; outline:none; background:#fff; box-shadow:0 0 0 3px rgba(59,130,246,0.12); }

.cr-conv-selects { display:grid; grid-template-columns:1fr auto 1fr; gap:12px; align-items:end; }
.cr-swap-button { background:#1e293b; color:#fff; border:none; width:44px; height:44px; border-radius:50%; font-size:20px; cursor:pointer; transition:all 0.2s; margin-bottom:16px; flex-shrink:0; display:flex; align-items:center; justify-content:center; }
.cr-swap-button:hover { background:#3b82f6; transform:scale(1.1); }

.cr-conv-result { background:linear-gradient(135deg,#1e293b,#334155); color:#fff; padding:18px; border-radius:12px; text-align:center; font-size:20px; font-weight:700; min-height:28px; margin-top:8px; letter-spacing:-0.3px; }

/* ======================= PAIR LINKS GRID ======================= */
.cr-pair-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:14px; margin:20px 0; }
.cr-pair-card { display:flex; flex-direction:column; padding:16px; background:#fff; border:1px solid #e2e8f0; border-radius:12px; text-decoration:none; color:#1f2937; transition:all 0.2s ease; }
.cr-pair-card:hover { border-color:#3b82f6; box-shadow:0 4px 16px rgba(59,130,246,0.12); transform:translateY(-3px); }
.cr-pair-card-top { display:flex; align-items:center; gap:10px; margin-bottom:6px; }
.cr-pair-card-flag { font-size:28px; line-height:1; }
.cr-pair-card-codes { font-weight:700; font-size:14px; color:#1e293b; letter-spacing:0.3px; }
.cr-pair-card-name { font-size:12px; color:#64748b; margin-bottom:6px; }
.cr-pair-card-rate { font-size:12px; color:#3b82f6; font-weight:600; background:#eff6ff; padding:4px 8px; border-radius:6px; display:inline-block; }

/* ======================= RESPONSIVE ======================= */
@media(max-width:768px) {
    .cr-tables-grid, .cr-info-grid { grid-template-columns:1fr; }
    .cr-summary-bar { grid-template-columns:1fr; }
    .cr-hero-value { font-size:30px; }
    .cr-hero-rates-row { flex-direction:column; align-items:center; }
    .cr-hero-rate-pill { min-width:200px; }
    .cr-hero-card { padding:24px 16px; }
    .cr-conv-selects { grid-template-columns:1fr; }
    .cr-swap-button { margin:0 auto 16px; }
    .cr-converter-card { max-width:100%; }
    .cr-table-header { flex-direction:column; align-items:flex-start; }
    .cr-rate-table thead th, .cr-rate-table td { padding:10px 12px; font-size:13px; }
    .cr-pair-grid { grid-template-columns:repeat(2,1fr); }
}
@media(max-width:480px) {
    .cr-code-cell { display:none; }
    .cr-pair-grid { grid-template-columns:1fr 1fr; gap:10px; }
    .cr-pair-card { padding:12px; }
    .cr-hero-flag { font-size:32px; }
}
