/* =============================================================================
   Metall Einzelpreise Plugin – Styles
   ============================================================================= */

/* --- Fehlermeldungen --- */
.mep-fehler {
    color: #c0392b;
    font-weight: bold;
}

/* --- Lade-Animation --- */
@keyframes mep-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

.mep-loading {
    animation: mep-pulse 1.4s ease-in-out infinite;
}

/* =============================================================================
   Shortcode 1: [metall_preis] – Einzelpreis-Widget
   ============================================================================= */

.mep-widget {
    display: inline-block;
    background: #fff;
    border: 1px solid #dde3ea;
    border-radius: 8px;
    padding: 16px 24px;
    min-width: 180px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
    text-align: center;
    font-family: inherit;
}

.mep-widget-name {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7685;
    margin-bottom: 6px;
}

.mep-widget-preis {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a2433;
    line-height: 1.2;
}

.mep-widget-einheit {
    font-size: 1rem;
    font-weight: 400;
    color: #6b7685;
    margin-left: 3px;
}

.mep-widget-veraenderung {
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 6px;
}

.mep-widget-datum {
    font-size: 0.78rem;
    color: #9aa3ad;
    margin-top: 8px;
}

/* =============================================================================
   Shortcode 2: [metall_preistabelle] – Tabelle
   ============================================================================= */

.mep-tabelle-wrapper {
    width: 100%;
    overflow-x: auto;
    margin: 10px 0;
}

.mep-tabelle {
    width: 100%;
    border-collapse: collapse;
    font-family: inherit;
    font-size: 0.95rem;
}

.mep-tabelle thead tr {
    background: #1a2433;
    color: #fff;
}

.mep-tabelle thead th {
    padding: 11px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.mep-tabelle tbody tr {
    border-bottom: 1px solid #e8ecf0;
    transition: background 0.15s;
}

.mep-tabelle tbody tr:hover {
    background: #f4f7fb;
}

.mep-tabelle tbody tr:last-child {
    border-bottom: none;
}

.mep-td-name {
    padding: 10px 14px;
    font-weight: 600;
    color: #1a2433;
    white-space: nowrap;
}

.mep-td-preis {
    padding: 10px 14px;
    font-weight: 700;
    color: #1a2433;
    white-space: nowrap;
    text-align: right;
}

.mep-td-aenderung {
    padding: 10px 14px;
    font-weight: 600;
    white-space: nowrap;
    text-align: right;
}

.mep-td-datum {
    padding: 10px 14px;
    color: #9aa3ad;
    font-size: 0.85rem;
    white-space: nowrap;
    text-align: right;
}

/* =============================================================================
   Shortcode 3: [metall_preiskacheln] – Kacheln-Grid
   ============================================================================= */

.mep-kacheln-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 14px;
    margin: 10px 0;
}

.mep-kachel {
    background: #fff;
    border: 1px solid #dde3ea;
    border-radius: 8px;
    padding: 16px 14px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transition: transform 0.15s, box-shadow 0.15s;
}

.mep-kachel:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.mep-kachel-name {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7685;
    margin-bottom: 8px;
}

.mep-kachel-preis {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1a2433;
    line-height: 1.2;
}

.mep-kachel-einheit {
    font-size: 0.9rem;
    font-weight: 400;
    color: #6b7685;
    margin-left: 2px;
}

.mep-kachel-veraenderung {
    font-size: 0.82rem;
    font-weight: 600;
    margin-top: 6px;
}

.mep-kachel-datum {
    font-size: 0.75rem;
    color: #9aa3ad;
    margin-top: 8px;
}

/* =============================================================================
   Farben: Steigt / Fällt
   ============================================================================= */

.mep-steigt,
.mep-kachel.mep-steigt .mep-kachel-veraenderung {
    color: #1a8a45;
}

.mep-faellt,
.mep-kachel.mep-faellt .mep-kachel-veraenderung {
    color: #c0392b;
}

/* Subtile Hintergrundfarbe bei Kacheln mit Veränderung */
.mep-kachel.mep-steigt {
    border-color: #b7e4c7;
}

.mep-kachel.mep-faellt {
    border-color: #f5c6c6;
}

/* =============================================================================
   Responsiv
   ============================================================================= */

@media (max-width: 600px) {
    .mep-kacheln-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 10px;
    }

    .mep-kachel-preis {
        font-size: 1.15rem;
    }

    .mep-widget {
        width: 100%;
        box-sizing: border-box;
    }
}
