/* ============================================================
   Edelmetall-Kursanzeige - Stylesheet
   ============================================================ */

.em-zeile:hover td
{
	background-color: #f9f9f9;
	cursor: pointer;
}


/* --- Edelmetall-Tabelle --- */
.em-tabelle {
    width: 100%;
    border-collapse: collapse;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
}

.em-tabelle thead th {
    background: #2c3e50;
    color: #fff;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
}

.em-tabelle thead th:nth-child(2),
.em-tabelle thead th:nth-child(3) {
    text-align: right;
}

.em-tabelle tbody tr {
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    transition: background-color 0.15s;
}

.em-tabelle tbody tr:hover {
    background-color: #f0f7ff;
}

.em-tabelle td {
    padding: 12px 16px;
}

.em-name {
    font-weight: 500;
    color: #2c3e50;
}

.em-preis {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: #1a1a1a;
}

.em-einheit {
    text-align: right;
    color: #666;
    font-size: 13px;
}


/* --- Modal-Overlay --- */
.em-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.em-modal {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 720px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}


/* --- Modal-Header --- */
.em-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid #e0e0e0;
}

.em-modal-titel {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.em-modal-close-x {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.15s;
}

.em-modal-close-x:hover {
    color: #333;
}


/* --- Zeitraum-Auswahl --- */
.em-zeitraum-auswahl {
    display: flex;
    gap: 8px;
    padding: 16px 24px 8px;
    flex-wrap: wrap;
}

.em-zeitraum-btn {
    padding: 6px 16px;
    border: 1px solid #d0d0d0;
    border-radius: 20px;
    background: #fff;
    color: #555;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.em-zeitraum-btn:hover {
    border-color: #2c3e50;
    color: #2c3e50;
}

.em-zeitraum-btn.active {
    background: #2c3e50;
    color: #fff;
    border-color: #2c3e50;
}


/* --- Edelmetall-Name unter Zeitraum --- */
.em-metall-name {
    padding: 8px 24px 4px;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}


/* --- Chart-Container --- */
.em-chart-container {
    position: relative;
    padding: 8px 24px 16px;
    min-height: 300px;
}

.em-chart-container canvas {
    width: 100% !important;
    height: 300px !important;
}

.em-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #999;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.em-zeitraum-btn, .em-btn-schliessen
{
	height: auto !important;
	line-height: unset !important;
}

/* --- Modal-Footer --- */
.em-modal-footer {
    display: flex;
    justify-content: flex-end;
    padding: 12px 24px 16px;
    border-top: 1px solid #e0e0e0;
}



.em-btn-schliessen {
    padding: 8px 24px;
    background: #2c3e50;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.15s;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.em-btn-schliessen:hover
{
    background: #1a252f;
    color: #fff !important;
}


/* --- Responsive --- */
@media (max-width: 600px) {
    .em-modal {
        width: 96%;
        max-height: 95vh;
    }

    .em-modal-header {
        padding: 12px 16px;
    }

    .em-zeitraum-auswahl {
        padding: 12px 16px 8px;
        gap: 6px;
    }

    .em-zeitraum-btn {
        padding: 5px 12px;
        font-size: 12px;
    }

    .em-metall-name {
        padding: 8px 16px 4px;
    }

    .em-chart-container {
        padding: 8px 16px 16px;
        min-height: 220px;
    }

    .em-chart-container canvas {
        height: 220px !important;
    }

    .em-modal-footer {
        padding: 12px 16px;
    }
}
