.ff-calendar-wrapper {
    max-width: 100%;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.ff-calendar-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.ff-calendar-header h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
    color: #333;
}

.ff-calendar-filters {
    background: linear-gradient(180deg, #f7f8fb 0%, #eef2f7 100%);
    padding: 18px;
    border-radius: 14px;
    margin-bottom: 18px;
    border: 1px solid #d9e1ea;
}

.ff-calendar-filters form {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.ff-filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    position: relative;
}

.ff-filter-group label {
    font-size: 13px;
    font-weight: 600;
    color: #555;
}

.ff-filter-group select {
    padding: 10px 12px;
    border: 1px solid #c8d2de;
    border-radius: 10px;
    font-size: 14px;
    background: white;
    min-width: 180px;
    cursor: pointer;
}

.ff-filter-group small {
    font-size: 12px;
    color: #777;
}

.ff-filter-group select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
}

.ff-filter-btn,
.ff-reset-btn {
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
}

.ff-filter-btn {
    background: #1f7a5a;
    color: white;
    border: none;
}

.ff-filter-btn:hover {
    background: #176147;
}

.ff-reset-btn {
    background: #fff;
    color: #415366;
    border: 1px solid #c8d2de;
}

.ff-reset-btn:hover {
    background: #f4f7fa;
    text-decoration: none;
}

.ff-dropdown {
    position: relative;
    min-width: 220px;
}

.ff-dropdown-trigger {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #c8d2de;
    border-radius: 10px;
    background: #fff;
    color: #22313f;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
}

.ff-dropdown-trigger::after {
    content: "▾";
    float: right;
    color: #66788a;
}

.ff-dropdown.is-open .ff-dropdown-trigger {
    border-color: #1f7a5a;
    box-shadow: 0 0 0 3px rgba(31, 122, 90, 0.12);
}

.ff-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 20;
    min-width: 100%;
    padding: 10px;
    border: 1px solid #c8d2de;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 14px 28px rgba(18, 35, 52, 0.12);
    display: none;
}

.ff-dropdown.is-open .ff-dropdown-menu {
    display: grid;
    gap: 8px;
}

.ff-dropdown-menu-scroll {
    max-height: 260px;
    overflow-y: auto;
}

.ff-dropdown-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 9px;
    cursor: pointer;
    color: #22313f;
}

.ff-dropdown-option:hover {
    background: #f5f8fb;
}

.ff-dropdown-option input {
    margin: 0;
}

.ff-impact-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex: 0 0 auto;
}

.ff-impact-dot-all {
    background: linear-gradient(135deg, #d94448 0%, #ffc107 100%);
}

.ff-calendar-legend {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.ff-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

.ff-impact-high,
.ff-impact-medium,
.ff-impact-low {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.ff-impact-high {
    background-color: #d94448;
}

.ff-impact-medium {
    background-color: #ff9800;
}

.ff-impact-low {
    background-color: #ffc107;
}

.ff-calendar-table {
    overflow-x: auto;
}

.ff-calendar-table table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-radius: 12px;
    overflow: hidden;
}

.ff-calendar-table thead {
    background-color: #f5f5f5;
}

.ff-calendar-table th {
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: #555;
    border-bottom: 2px solid #e0e0e0;
    white-space: nowrap;
}

.ff-calendar-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    color: #333;
}

.ff-date-row td {
    background-color: #fafafa;
    font-weight: 600;
    color: #444;
    padding: 8px;
}

.ff-event-row:hover {
    background-color: #f9f9f9;
}

.ff-no-events {
    text-align: center;
    padding: 30px !important;
    color: #999;
    font-style: italic;
}

.ff-hidden-row {
    display: none;
}

.ff-calendar-footer {
    margin-top: 10px;
    text-align: right;
    color: #999;
    font-size: 12px;
}

.ff-calendar-error {
    padding: 20px;
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    color: #856404;
    text-align: center;
}

/* Responsive design */
@media (max-width: 768px) {
    .ff-calendar-filters form {
        flex-direction: column;
        align-items: stretch;
    }

    .ff-dropdown,
    .ff-filter-group select {
        min-width: 100%;
    }

    .ff-calendar-table table {
        font-size: 12px;
    }
    
    .ff-calendar-table th,
    .ff-calendar-table td {
        padding: 8px 4px;
    }
    
    .ff-calendar-legend {
        font-size: 12px;
    }
}
