/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

.header {
    background-color: #2d5f3f;
    color: white;
    padding: 40px 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    position: relative; /* Add relative positioning to the header */
}

.header h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.user-icon {
    position: absolute; /* Position the user icon absolutely within the header */
    top: 50%; /* Center vertically */
    right: 20px; /* Align to the right with some padding */
    transform: translateY(-50%); /* Adjust for vertical centering */
}

.user-icon img {
    width: 40px; /* Set the size of the user icon */
    height: 40px;
    border-radius: 50%; /* Make it circular */
    cursor: pointer; /* Add a pointer cursor for interactivity */
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    gap: 20px;
}

/* Sidebar Filters */
.sidebar {
    width: 280px;
    flex-shrink: 0;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 0;
    align-self: flex-start;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 2px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-icon {
    font-size: 20px;
}

.clear-all-btn {
    background: none;
    border: none;
    color: #2d5f3f;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.clear-all-btn:hover {
    color: #1f4530;
}

.apply-filters-btn {
    width: calc(100% - 40px);
    margin: 16px 20px;
    padding: 12px 20px;
    background-color: #2d5f3f;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.apply-filters-btn:hover {
    background-color: #1f4530;
}

.filter-section {
    border-bottom: 1px solid #e0e0e0;
}

.filter-section-header {
    width: 100%;
    background: none;
    border: none;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.2s;
}

.filter-section-header:hover {
    background-color: #f5f5f5;
}

.filter-section-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.filter-count {
    display: none;
    background-color: #2d5f3f;
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: auto;
    margin-right: 8px;
}

.filter-chevron {
    font-size: 18px;
    color: #666;
    transition: transform 0.2s;
}

.filter-section-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 20px;
}

.filter-section-content.active {
    max-height: 500px;
    padding: 0 20px 16px 20px;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    padding: 8px 0;
    cursor: pointer;
    position: relative;
}

.filter-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    height: 18px;
    width: 18px;
    border: 2px solid #ddd;
    border-radius: 3px;
    margin-right: 10px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.filter-checkbox:hover .checkmark {
    border-color: #2d5f3f;
}

.filter-checkbox input[type="checkbox"]:checked ~ .checkmark {
    background-color: #2d5f3f;
    border-color: #2d5f3f;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-checkbox input[type="checkbox"]:checked ~ .checkmark::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
}

.filter-label-text {
    font-size: 14px;
    color: #555;
}

/* Main Content Area */
.main-content {
    flex: 1;
    min-width: 0;
}

.toolbar {
    background-color: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.view-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.view-btn {
    padding: 10px 20px;
    background-color: #f5f5f5;
    color: #333;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.view-btn:hover {
    background-color: #e8e8e8;
}

.view-btn.active {
    background-color: #2d5f3f;
    color: white;
    border-color: #2d5f3f;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
}

.search-input:focus {
    outline: none;
    border-color: #2d5f3f;
}

/* Remove old filter styles */
.filters {
    display: none;
}

.filters-container {
    display: none;
}

.filters-toggle {
    display: none;
}

.filter-select {
    display: none;
}

.clear-filters {
    display: none;
}

.calendar-header {
    background-color: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calendar-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-button {
    padding: 10px 20px;
    background-color: #2d5f3f;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: background-color 0.2s;
}

.nav-button:hover {
    background-color: #1f4530;
}

.month-year {
    font-size: 24px;
    font-weight: 700;
    color: #2d5f3f;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background-color: #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.day-header {
    background-color: #2d5f3f;
    color: white;
    padding: 15px;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calendar-day {
    background-color: white;
    min-height: 150px;
    padding: 12px;
    position: relative;
    transition: background-color 0.2s;
}

.calendar-day:hover {
    background-color: #f9f9f9;
}

.calendar-day.other-month {
    background-color: #fafafa;
    color: #999;
}

.day-number {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 8px;
    color: #333;
}

.calendar-day.other-month .day-number {
    color: #999;
}

.event-count {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 600;
}

.event-item {
    background-color: #e8f5e9;
    border-left: 3px solid #2d5f3f;
    padding: 6px 8px;
    margin-bottom: 6px;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.4;
    cursor: pointer;
    transition: all 0.2s;
}

.event-item:hover {
    background-color: #c8e6c9;
    transform: translateX(2px);
}

.event-time {
    font-weight: 600;
    color: #2d5f3f;
    display: block;
    margin-bottom: 2px;
}

.event-title {
    color: #333;
    font-weight: 500;
}

.event-item.all-day {
    background-color: #fff3e0;
    border-left-color: #f57c00;
}

.event-item.all-day:hover {
    background-color: #ffe0b2;
}

.event-item.all-day .event-time {
    color: #f57c00;
}

.today {
    background-color: #fff9e6 !important;
    box-shadow: inset 0 0 0 2px #ffc107;
}

.view-more {
    color: #2d5f3f;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 4px;
    display: inline-block;
}

.view-more:hover {
    text-decoration: underline;
}

/* Event Hover Popup */
.event-popup {
    position: fixed;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    padding: 0;
    z-index: 1000;
    min-width: 350px;
    max-width: 450px;
    display: none;
    overflow: hidden;
}

.event-popup.show {
    display: block;
}

.event-popup-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: #e0e0e0;
}

.event-popup-content {
    padding: 20px;
}

.event-popup-date {
    color: #666;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-popup-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
    line-height: 1.3;
}

.event-popup-title::after {
    content: '→';
    margin-left: 8px;
    color: #2d5f3f;
}

.event-popup-description {
    color: #555;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 0;
}

@media (max-width: 1024px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        position: static;
        max-height: none;
    }

    .calendar-grid {
        grid-template-columns: repeat(7, 1fr);
        gap: 1px;
    }

    .calendar-day {
        min-height: 120px;
        padding: 8px;
    }

    .event-item {
        font-size: 11px;
        padding: 4px 6px;
    }

    .day-number {
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
    }

    .filter-section-content.active {
        max-height: 400px;
    }

    .calendar-header {
        flex-direction: column;
        gap: 15px;
    }

    .calendar-grid {
        grid-template-columns: repeat(7, 1fr);
        font-size: 12px;
    }

    .calendar-day {
        min-height: 80px;
        padding: 6px;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
    }

    .calendar-day.selected {
        background-color: #c8e6c9 !important;
        box-shadow: inset 0 0 0 2px #2d5f3f;
    }

    .day-header {
        padding: 10px 5px;
        font-size: 11px;
    }

    .calendar-day .event-item {
        display: none;
    }

    .calendar-day .event-count {
        display: none;
    }

    .calendar-day .view-more {
        display: none;
    }

    .calendar-day.has-events::after {
        content: '';
        width: 6px;
        height: 6px;
        background-color: #2d5f3f;
        border-radius: 50%;
        margin-top: 4px;
        display: block;
    }

    .calendar-day.other-month.has-events::after {
        background-color: #999;
    }

    .day-number {
        font-size: 13px;
    }

    .event-popup {
        display: none !important;
    }
}

/* Mobile Event Details Section */
.mobile-events-section {
    display: none;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
    padding: 20px;
    margin-top: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.mobile-events-section.show {
    display: block;
}

.mobile-events-header {
    font-size: 18px;
    font-weight: 700;
    color: #2d5f3f;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.mobile-event-card {
    background-color: #f5f5f5;
    border-left: 4px solid #2d5f3f;
    padding: 12px;
    margin-bottom: 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.mobile-event-card:hover {
    background-color: #e8f5e9;
    transform: translateX(2px);
}

.mobile-event-time {
    font-weight: 600;
    color: #2d5f3f;
    font-size: 13px;
    margin-bottom: 4px;
}

.mobile-event-title {
    font-weight: 600;
    color: #333;
    font-size: 15px;
    margin-bottom: 4px;
}

.mobile-event-description {
    color: #666;
    font-size: 13px;
    line-height: 1.4;
    margin-top: 8px;
}

.no-events-message {
    text-align: center;
    color: #666;
    font-size: 14px;
    padding: 20px;
}

@media (min-width: 769px) {
    .mobile-events-section {
        display: none !important;
    }
}

