/**
* GOOGLE CALENDAR ENHANCED STYLES
* Matches Google Calendar interface design
* Professional calendar with navigation controls
*/

/* ============================================
  CALENDAR HEADER - Google Calendar Style
  ============================================ */
.calendar-header {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 8px 8px 0 0;
}

body.dark-mode .calendar-header {
    background: #1a1a2e;
    border-bottom-color: #2d2d44;
}

.calendar-title {
    font-size: 22px;
    font-weight: 400;
    color: #3c4043;
    margin: 0;
}

body.dark-mode .calendar-title {
    color: #e8eaed;
}

.calendar-instruction {
    font-size: 14px;
    color: #5f6368;
    margin-top: 4px;
}

body.dark-mode .calendar-instruction {
    color: #9aa0a6;
}

/* ============================================
  CALENDAR NAVIGATION BAR
  ============================================ */
.calendar-nav-bar {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

body.dark-mode .calendar-nav-bar {
    background: #1a1a2e;
    border-bottom-color: #2d2d44;
}

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

.calendar-nav-btn {
    background: transparent;
    border: 1px solid #dadce0;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 14px;
    color: #3c4043;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

body.dark-mode .calendar-nav-btn {
    border-color: #5f6368;
    color: #e8eaed;
}

.calendar-nav-btn:hover {
    background: #f1f3f4;
    border-color: #dadce0;
}

body.dark-mode .calendar-nav-btn:hover {
    background: #2d2d44;
    border-color: #5f6368;
}

.calendar-nav-btn:active {
    background: #e8eaed;
}

body.dark-mode .calendar-nav-btn:active {
    background: #3d3d5c;
}

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

.calendar-nav-arrow {
    background: transparent;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #5f6368;
    transition: all 0.2s ease;
}

body.dark-mode .calendar-nav-arrow {
    color: #9aa0a6;
}

.calendar-nav-arrow:hover {
    background: #f1f3f4;
    color: #3c4043;
}

body.dark-mode .calendar-nav-arrow:hover {
    background: #2d2d44;
    color: #e8eaed;
}

.calendar-nav-arrow svg {
    width: 20px;
    height: 20px;
}

.calendar-month-year {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #3c4043;
    font-weight: 500;
    min-width: 140px;
    justify-content: center;
}

body.dark-mode .calendar-month-year {
    color: #e8eaed;
}

.calendar-month-year select {
    background: transparent;
    border: none;
    font-size: 14px;
    font-weight: 500;
    color: #3c4043;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
}

body.dark-mode .calendar-month-year select {
    color: #e8eaed;
}

.calendar-month-year select:hover {
    background: #f1f3f4;
}

body.dark-mode .calendar-month-year select:hover {
    background: #2d2d44;
}

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

.calendar-nav-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #5f6368;
    transition: all 0.2s ease;
    border: none;
    background: transparent;
}

body.dark-mode .calendar-nav-icon {
    color: #9aa0a6;
}

.calendar-nav-icon:hover {
    background: #f1f3f4;
    color: #3c4043;
}

body.dark-mode .calendar-nav-icon:hover {
    background: #2d2d44;
    color: #e8eaed;
}

.calendar-view-selector {
    display: flex;
    align-items: center;
    gap: 4px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    padding: 4px;
    background: #fff;
}

body.dark-mode .calendar-view-selector {
    border-color: #5f6368;
    background: #1a1a2e;
}

.calendar-view-btn {
    background: transparent;
    border: none;
    padding: 6px 12px;
    font-size: 14px;
    color: #5f6368;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

body.dark-mode .calendar-view-btn {
    color: #9aa0a6;
}

.calendar-view-btn:hover {
    background: #f1f3f4;
    color: #3c4043;
}

body.dark-mode .calendar-view-btn:hover {
    background: #2d2d44;
    color: #e8eaed;
}

.calendar-view-btn.active {
    background: #1a73e8;
    color: #fff;
}

body.dark-mode .calendar-view-btn.active {
    background: #4285f4;
}

/* ============================================
  CALENDAR WRAPPER ENHANCED
  ============================================ */
.calendar-wrapper-enhanced {
    background: #fff;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

body.dark-mode .calendar-wrapper-enhanced {
    background: #1a1a2e;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.calendar-wrapper-enhanced iframe {
    width: 100%;
    height: 600px;
    border: none;
    display: block;
}

/* ============================================
  CALENDAR FOOTER
  ============================================ */
.calendar-footer {
    background: #fff;
    border-top: 1px solid #e0e0e0;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: #5f6368;
    border-radius: 0 0 8px 8px;
}

body.dark-mode .calendar-footer {
    background: #1a1a2e;
    border-top-color: #2d2d44;
    color: #9aa0a6;
}

.calendar-timezone {
    display: flex;
    align-items: center;
    gap: 8px;
}

.calendar-add-link {
    color: #1a73e8;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s ease;
}

body.dark-mode .calendar-add-link {
    color: #8ab4f8;
}

.calendar-add-link:hover {
    color: #1557b0;
    text-decoration: underline;
}

body.dark-mode .calendar-add-link:hover {
    color: #aecbfa;
}

.calendar-google-logo {
    display: flex;
    align-items: center;
    gap: 4px;
}

.calendar-google-logo img {
    height: 16px;
    width: auto;
}

/* ============================================
  RESPONSIVE DESIGN
  ============================================ */
@media (max-width: 768px) {
    .calendar-header {
        padding: 12px 16px;
        flex-direction: column;
        align-items: flex-start;
    }

    .calendar-title {
        font-size: 18px;
    }

    .calendar-instruction {
        font-size: 12px;
    }

    .calendar-nav-bar {
        padding: 8px 16px;
        flex-wrap: wrap;
    }

    .calendar-nav-left,
    .calendar-nav-right {
        flex: 1;
        min-width: 100%;
    }

    .calendar-month-year {
        min-width: auto;
        flex: 1;
    }

    .calendar-wrapper-enhanced iframe {
        height: 500px;
    }

    .calendar-footer {
        padding: 8px 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .calendar-wrapper-enhanced iframe {
        height: 400px;
    }

    .calendar-nav-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .calendar-nav-left,
    .calendar-nav-right {
        justify-content: center;
    }
}

/* ============================================
  LOADING STATE
  ============================================ */
.calendar-wrapper-enhanced.loading {
    position: relative;
    min-height: 600px;
}

.calendar-wrapper-enhanced.loading::after {
    content: 'Loading calendar...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #5f6368;
    font-size: 14px;
    z-index: 1;
}

body.dark-mode .calendar-wrapper-enhanced.loading::after {
    color: #9aa0a6;
}


/* Focus styles for accessibility - Auto-added */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}
