/* Strafx Forex Calendar Widget */
.strafx-forex-calendar {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin: 20px 0;
    background: #fff;
    color: #2c3e50;
}

.strafx-forex-calendar.dark {
    background: #1a1d22;
    color: #ecf0f1;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #8EC63F;
    color: white;
}

.calendar-header h3 {
    margin: 0;
    font-weight: 600;
    font-size: 1.2em;
}

.calendar-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.timezone-selector,
.currency-filters label input {
    border-radius: 4px;
    padding: 4px 8px;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.1);
    color: white;
}

.currency-filters {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.currency-filters label {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 0.85em;
    background: rgba(0,0,0,0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.calendar-body {
    padding: 0;
}

.forex-events-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92em;
}

.forex-events-table th,
.forex-events-table td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.strafx-forex-calendar.dark .forex-events-table th,
.strafx-forex-calendar.dark .forex-events-table td {
    border-bottom: 1px solid #34495e;
}

.event-row.event-today {
    background: rgba(142, 198, 63, 0.08) !important;
    border-left: 3px solid #8EC63F;
}

.currency.USD { color: #d70015; }
.currency.EUR { color: #0057b8; }
.currency.GBP { color: #006a4e; }
.currency.JPY { color: #bc002d; }
.currency.AUD { color: #ff7f00; }
.currency.CAD { color: #ff0000; }
.currency.CHF { color: #0099cc; }
.currency.NZD { color: #00a651; }

.impact.high { color: #d00; font-weight: bold; }
.impact.medium { color: #f90; }
.impact.low { color: #aaa; }

.calendar-footer {
    padding: 14px 20px;
    background: #f8f9fa;
    text-align: right;
    font-size: 0.85em;
    border-top: 1px solid #eee;
}

.strafx-forex-calendar.dark .calendar-footer {
    background: #23272b;
    border-top: 1px solid #34495e;
}

.calendar-footer a {
    color: #8EC63F;
    text-decoration: none;
    font-weight: 500;
}

.calendar-footer a:hover {
    text-decoration: underline;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.3);
    position: relative;
    color: #333;
}

.dark .modal-content {
    background: #2a2e33;
    color: #ecf0f1;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

.modal-data {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 15px 0;
}

.modal-data p {
    margin: 5px 0;
}

/* Position Overrides */
.forex-top {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
}

.forex-bottom {
    margin-top: 40px;
    padding: 20px 0;
    border-top: 2px solid #8EC63F;
}

/* Responsive */
@media (max-width: 768px) {
    .calendar-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .modal-data {
        grid-template-columns: 1fr;
    }

    .forex-events-table th:nth-child(4),
    .forex-events-table td:nth-child(4) {
        display: none;
    }
}