/* =============================================
   Oil Price Widget — Stylesheet
   ============================================= */

/* --- Inline span --- */
.opw-inline {
    font-weight: 700;
    color: #1a7a3c;
    cursor: default;
}

/* --- Badge --- */
.opw-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #0f2a1a;
    color: #4cffaa;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 3px 10px 3px 8px;
    border-radius: 3px;
    border: 1px solid #1e5c38;
    white-space: nowrap;
}
.opw-badge::before {
    content: "●";
    font-size: 0.55rem;
    color: #4cffaa;
    animation: opw-blink 2s step-end infinite;
}
@keyframes opw-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

/* --- Card --- */
.opw-card {
    display: inline-block;
    background: #ffffff;
    border: 1px solid #e0e6ec;
    border-left: 4px solid #1a7a3c;
    border-radius: 6px;
    padding: 16px 20px;
    min-width: 180px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    font-family: inherit;
    vertical-align: top;
}
.opw-card__label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7a8d;
    margin-bottom: 6px;
}
.opw-card__price {
    font-size: 1.9rem;
    font-weight: 800;
    color: #0d1f12;
    line-height: 1;
    margin-bottom: 4px;
}
.opw-card__unit {
    font-size: 0.78rem;
    color: #1a7a3c;
    font-weight: 600;
    margin-bottom: 10px;
}
.opw-card__time {
    font-size: 0.7rem;
    color: #9aa5b4;
    border-top: 1px solid #eef1f4;
    padding-top: 8px;
    margin-top: 4px;
}

/* Dark-mode support */
@media (prefers-color-scheme: dark) {
    .opw-card {
        background: #0f1e14;
        border-color: #1e3a25;
        border-left-color: #4cffaa;
        box-shadow: 0 2px 12px rgba(0,0,0,0.3);
    }
    .opw-card__label { color: #6b8f75; }
    .opw-card__price { color: #e8f5ec; }
    .opw-card__unit  { color: #4cffaa; }
    .opw-card__time  { color: #4a6654; border-top-color: #1e3a25; }
}

/* --- Table --- */
.opw-table-wrap {
    overflow-x: auto;
    margin: 1em 0;
}
.opw-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    background: #fff;
    border: 1px solid #e0e6ec;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}
.opw-table thead tr {
    background: #0f2a1a;
    color: #b0ffd0;
}
.opw-table th {
    padding: 11px 16px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    text-align: left;
}
.opw-table tbody tr {
    border-bottom: 1px solid #eef1f4;
    transition: background 0.15s;
}
.opw-table tbody tr:last-child { border-bottom: none; }
.opw-table tbody tr:hover { background: #f4fbf6; }
.opw-table td {
    padding: 11px 16px;
    vertical-align: middle;
}
.opw-table .opw-name  { font-weight: 600; color: #1a2b22; }
.opw-table .opw-price { font-weight: 800; color: #1a7a3c; font-size: 1.05rem; }
.opw-table .opw-unit  { color: #6b7a8d; font-size: 0.82rem; }
.opw-table .opw-time  { color: #9aa5b4; font-size: 0.78rem; }

/* Dark mode - table */
@media (prefers-color-scheme: dark) {
    .opw-table {
        background: #0f1e14;
        border-color: #1e3a25;
    }
    .opw-table tbody tr { border-bottom-color: #1e3a25; }
    .opw-table tbody tr:hover { background: #162b1f; }
    .opw-table .opw-name  { color: #d0eeda; }
    .opw-table .opw-price { color: #4cffaa; }
    .opw-table .opw-unit  { color: #4a6654; }
    .opw-table .opw-time  { color: #3a5a47; }
}

/* --- Attribution --- */
.opw-attribution {
    text-align: right;
    font-size: 0.7rem;
    color: #9aa5b4;
    margin-top: 6px;
}
.opw-attribution a { color: #1a7a3c; text-decoration: none; }
.opw-attribution a:hover { text-decoration: underline; }

/* --- Error --- */
.opw-error {
    color: #c0392b;
    font-size: 0.85rem;
    font-style: italic;
}
