/* ============================================================
   Utility Rates WordPress Plugin Styles
   Publisher: Utility Rates — https://UtilitiesRates.com
   ============================================================ */

/* ---- Reset & Base ---- */
.ur-dashboard, .ur-wrapper, .ur-news-section {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
    font-size: 15px;
    color: #1a1a2e;
    line-height: 1.5;
    max-width: 100%;
}

/* ---- Header ---- */
.ur-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #ffffff;
    padding: 24px 28px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 0;
}

.ur-main-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 4px;
    color: #ffffff;
}

.ur-subtitle {
    margin: 0;
    opacity: 0.85;
    font-size: 13px;
}

.ur-subtitle a { color: #e94560; text-decoration: none; }
.ur-subtitle a:hover { text-decoration: underline; }

.ur-update-badge {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

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

.ur-tab {
    padding: 14px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    transition: all 0.2s ease;
    margin-bottom: -2px;
    white-space: nowrap;
}

.ur-tab:hover { color: #e94560; background: rgba(233,69,96,0.05); }

.ur-tab.active {
    color: #e94560;
    border-bottom-color: #e94560;
    background: #ffffff;
}

/* ---- Tab Content ---- */
.ur-tab-content {
    display: none;
    padding: 24px;
    background: #ffffff;
    border-radius: 0 0 12px 12px;
    border: 1px solid #e2e8f0;
    border-top: none;
}

.ur-tab-content.active { display: block; }

/* ---- Section title ---- */
.ur-section-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 8px;
}

.ur-source-note, .ur-timestamp {
    font-size: 12px;
    color: #64748b;
    margin: 4px 0;
}

.ur-source-note a { color: #e94560; text-decoration: none; }
.ur-source-note a:hover { text-decoration: underline; }

/* ---- Filter Bar ---- */
.ur-filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.ur-filter-bar label {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
}

.ur-state-filter {
    padding: 6px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13px;
    background: #ffffff;
    cursor: pointer;
    min-width: 200px;
}

/* ---- State Block ---- */
.ur-state-block {
    margin-bottom: 28px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
}

.ur-state-header {
    background: linear-gradient(90deg, #1a1a2e, #0f3460);
    color: white;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ur-state-badge {
    background: #e94560;
    color: white;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.ur-state-badge.small {
    padding: 2px 8px;
    font-size: 11px;
}

.ur-state-name {
    font-weight: 600;
    font-size: 16px;
}

.ur-grid-badge {
    margin-left: auto;
    background: rgba(255,255,255,0.2);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ---- Utility Block ---- */
.ur-utility-block {
    padding: 16px 18px;
    border-top: 1px solid #e2e8f0;
    background: #fafbfc;
}

.ur-utility-block:first-of-type { border-top: none; }

.ur-utility-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.ur-utility-name {
    font-size: 15px;
    font-weight: 700;
    color: #0f3460;
    text-decoration: none;
}

.ur-utility-name:hover { color: #e94560; text-decoration: underline; }

.ur-update-freq, .ur-effective {
    font-size: 11px;
    color: #64748b;
    background: #f1f5f9;
    padding: 3px 8px;
    border-radius: 10px;
}

.ur-source-link {
    font-size: 11px;
    color: #e94560;
    text-decoration: none;
    margin-left: auto;
    padding: 3px 10px;
    border: 1px solid #e94560;
    border-radius: 10px;
    white-space: nowrap;
}

.ur-source-link:hover { background: #e94560; color: white; }

/* ---- Tables ---- */
.ur-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 8px 0;
}

.ur-rates-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.ur-rates-table thead {
    background: #1a1a2e;
    color: white;
}

.ur-rates-table th {
    padding: 10px 14px;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.4px;
    text-align: left;
}

.ur-rates-table td {
    padding: 9px 14px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.ur-rates-table tbody tr:hover { background: #f8faff; }
.ur-rates-table tbody tr:last-child td { border-bottom: none; }

.ur-rate-value {
    font-weight: 700;
    color: #0f3460;
    white-space: nowrap;
}

.ur-tou-badge {
    background: #dbeafe;
    color: #1e40af;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.ur-market-rate {
    background: #fef3c7;
    color: #92400e;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

/* ---- Gas Table ---- */
.ur-gas-table th:nth-child(4) { min-width: 220px; }

.ur-choice-badge {
    background: #dcfce7;
    color: #14532d;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.ur-warning-badge {
    color: #d97706;
    font-size: 13px;
}

.ur-source-link-sm {
    font-size: 11px;
    color: #e94560;
    text-decoration: none;
    white-space: nowrap;
}

.ur-source-link-sm:hover { text-decoration: underline; }

/* ---- Notes & Verified ---- */
.ur-note {
    font-size: 12px;
    color: #475569;
    background: #f0f9ff;
    border-left: 3px solid #0ea5e9;
    padding: 6px 12px;
    margin: 8px 0;
    border-radius: 0 6px 6px 0;
}

.ur-verified-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #64748b;
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px dashed #e2e8f0;
    flex-wrap: wrap;
    gap: 6px;
}

.ur-verified-row a {
    color: #e94560;
    text-decoration: none;
    font-weight: 600;
}

.ur-verified-row a:hover { text-decoration: underline; }

/* ---- News Section ---- */
.ur-news-header {
    margin-bottom: 20px;
}

.ur-news-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 0;
    flex-wrap: wrap;
}

.ur-news-count {
    font-size: 12px;
    color: #64748b;
    background: #f1f5f9;
    padding: 3px 10px;
    border-radius: 10px;
}

.ur-rate-alert-badge {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fca5a5;
    padding: 3px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
}

.ur-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.ur-news-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ur-news-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.ur-news-card.ur-rate-increase {
    border-left: 4px solid #dc2626;
    background: linear-gradient(135deg, #fff5f5, #ffffff);
}

.ur-rate-increase-label {
    font-size: 11px;
    font-weight: 700;
    color: #dc2626;
    letter-spacing: 0.5px;
}

.ur-news-meta-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.ur-news-date {
    font-size: 11px;
    color: #64748b;
}

.ur-news-source {
    font-size: 11px;
    font-weight: 600;
    color: #0f3460;
    background: #e0e7ff;
    padding: 2px 8px;
    border-radius: 8px;
}

.ur-news-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    flex-grow: 1;
}

.ur-news-title a {
    color: #1a1a2e;
    text-decoration: none;
}

.ur-news-title a:hover { color: #e94560; text-decoration: underline; }

.ur-read-more {
    font-size: 12px;
    color: #e94560;
    text-decoration: none;
    font-weight: 600;
    margin-top: auto;
}

.ur-read-more:hover { text-decoration: underline; }

.ur-news-footer {
    font-size: 12px;
    color: #64748b;
    border-top: 1px solid #e2e8f0;
    padding-top: 12px;
    margin-top: 8px;
}

.ur-news-footer a { color: #e94560; text-decoration: none; }

/* ---- Disclaimer ---- */
.ur-disclaimer {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 18px;
    margin-top: 24px;
    font-size: 12px;
    color: #475569;
}

.ur-disclaimer p { margin: 4px 0; }
.ur-disclaimer a { color: #e94560; text-decoration: none; }
.ur-disclaimer a:hover { text-decoration: underline; }

.ur-publisher {
    font-weight: 600;
    font-size: 11px;
    color: #64748b;
    margin-top: 8px !important;
}

/* ---- No Data ---- */
.ur-no-data {
    text-align: center;
    padding: 30px;
    color: #64748b;
}

/* ---- Widget ---- */
.ur-widget-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.ur-widget-table th,
.ur-widget-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
}

.ur-widget-table th { font-weight: 700; background: #f1f5f9; }
.ur-widget-table a { color: #0f3460; text-decoration: none; }
.ur-widget-table a:hover { color: #e94560; }

.ur-widget-source {
    font-size: 11px;
    color: #64748b;
    margin-top: 8px;
}

.ur-widget-source a { color: #e94560; text-decoration: none; }

/* ---- Hidden state rows (JS filtering) ---- */
.ur-state-block.ur-hidden { display: none; }
.ur-gas-row.ur-hidden { display: none; }

/* ---- Admin ---- */
.ur-admin-wrap h1 { margin-bottom: 20px; }

.ur-admin-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.ur-admin-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.ur-admin-card h3 { margin: 0 0 10px; font-size: 15px; color: #0f3460; }
.ur-big-number { font-size: 36px; font-weight: 700; color: #e94560; margin: 0 0 4px; }

/* ---- Responsive ---- */
@media (max-width: 640px) {
    .ur-header { flex-direction: column; align-items: flex-start; border-radius: 8px 8px 0 0; }
    .ur-tabs { overflow-x: auto; }
    .ur-tab { padding: 12px 14px; font-size: 12px; }
    .ur-tab-content { padding: 14px; }
    .ur-utility-header { flex-direction: column; align-items: flex-start; }
    .ur-source-link { margin-left: 0; }
    .ur-news-grid { grid-template-columns: 1fr; }
    .ur-admin-cards { grid-template-columns: 1fr; }
}
