/* ===============================================
   GOOGLE CALENDAR STYLE - STEVE JOBS EDITION
   Минимализм. Чистота. Элегантность.
   =============================================== */

/* Header */
.gcal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.gcal-view-switcher {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 2px;
    gap: 2px;
}

.gcal-view-btn {
    padding: 8px 20px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gcal-view-btn.active {
    background: #ffffff;
    color: #000000;
}

.gcal-filter {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    width: 100%;
    max-width: 200px;
    box-sizing: border-box;
}

/* Navigation */
.gcal-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 10px;
}

.gcal-nav-btn {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ffffff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.gcal-nav-btn:active {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(0.95);
}

.gcal-month-title {
    flex: 1;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.gcal-today-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gcal-today-btn:active {
    background: rgba(255, 255, 255, 0.1);
}

/* ===============================================
   MONTH VIEW - ПОЛНОСТЬЮ АДАПТИВНЫЙ
   =============================================== */
.gcal-month-view {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    overflow: hidden;
}

.gcal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.gcal-weekday {
    padding: 12px 0;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.5;
}

.gcal-month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: rgba(255, 255, 255, 0.05);
}

.gcal-day {
    background: rgba(0, 0, 0, 0.2);
    aspect-ratio: 1;
    padding: 8px 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.gcal-day:active {
    background: rgba(255, 255, 255, 0.05);
    transform: scale(0.98);
}

.gcal-day.other-month {
    opacity: 0.3;
}

.gcal-day.today {
    background: rgba(66, 133, 244, 0.15);
}

.gcal-day.today .gcal-day-number {
    background: #4285f4;
    color: #ffffff;
}

.gcal-day-number {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    flex-shrink: 0;
}

.gcal-events {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.gcal-event-dot {
    height: 4px;
    border-radius: 2px;
    margin-bottom: 2px;
    flex-shrink: 0;
}

.gcal-event-dot.training {
    background: #4285f4;
}

.gcal-event-dot.competition {
    background: #f4b400;
}

.gcal-event-dot.event {
    background: #ea4335;
}

.gcal-event-count {
    font-size: 10px;
    font-weight: 700;
    color: #4285f4;
    margin-top: auto;
    flex-shrink: 0;
}

/* Адаптация под разные экраны */
@media (max-width: 768px) {
    .gcal-weekday {
        padding: 10px 0;
        font-size: 10px;
    }
    
    .gcal-day {
        padding: 6px 4px;
    }
    
    .gcal-day-number {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
    
    .gcal-event-dot {
        height: 3px;
    }
    
    .gcal-event-count {
        font-size: 9px;
    }
}

@media (max-width: 480px) {
    .gcal-weekday {
        padding: 8px 0;
        font-size: 9px;
    }
    
    .gcal-day {
        padding: 4px 2px;
    }
    
    .gcal-day-number {
        width: 20px;
        height: 20px;
        font-size: 11px;
    }
}

@media (min-width: 769px) {
    .gcal-day {
        padding: 12px 8px;
    }
    
    .gcal-day-number {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
}

/* ===============================================
   WEEK VIEW - ПОЛНОСТЬЮ АДАПТИВНЫЙ (БЕЗ СКРОЛЛА)
   =============================================== */
.gcal-week-view {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    overflow: hidden;
    max-width: 100%;
    width: 100%;
}

.gcal-week-container {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: rgba(255, 255, 255, 0.05);
    width: 100%;
}

.gcal-week-day {
    background: rgba(0, 0, 0, 0.2);
    min-height: 350px;
    display: flex;
    flex-direction: column;
}

.gcal-week-header {
    padding: 10px 4px;
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.gcal-week-day.today .gcal-week-header {
    background: rgba(66, 133, 244, 0.15);
}

.gcal-week-day.today .gcal-week-date {
    background: #4285f4;
    color: #ffffff;
}

.gcal-week-name {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.5;
    margin-bottom: 4px;
}

.gcal-week-date {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
    margin: 0 auto;
}

.gcal-week-events {
    padding: 4px 2px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    overflow-y: auto;
}

.gcal-week-event {
    padding: 4px 3px;
    border-radius: 3px;
    font-size: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    border-left: 3px solid;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.gcal-week-event:active {
    transform: scale(0.98);
}

.gcal-week-event.training {
    background: rgba(66, 133, 244, 0.15);
    border-left-color: #4285f4;
}

.gcal-week-event.competition {
    background: rgba(244, 180, 0, 0.15);
    border-left-color: #f4b400;
}

.gcal-week-event.event {
    background: rgba(234, 67, 53, 0.15);
    border-left-color: #ea4335;
}

.gcal-event-time {
    font-weight: 700;
    margin-bottom: 1px;
    font-size: 8px;
}

.gcal-event-title {
    opacity: 0.8;
    font-size: 7px;
    line-height: 1.1;
}

/* Адаптация недельного вида */
@media (min-width: 480px) {
    .gcal-week-name {
        font-size: 10px;
    }
    
    .gcal-week-date {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .gcal-week-event {
        padding: 8px 6px;
        font-size: 10px;
    }
    
    .gcal-event-time {
        font-size: 10px;
    }
    
    .gcal-event-title {
        font-size: 9px;
    }
}

@media (min-width: 768px) {
    .gcal-week-header {
        padding: 12px 8px;
    }
    
    .gcal-week-day {
        min-height: 400px;
    }
    
    .gcal-week-events {
        padding: 8px 6px;
        gap: 6px;
    }
    
    .gcal-week-event {
        padding: 10px 8px;
        font-size: 11px;
        border-radius: 6px;
    }
    
    .gcal-event-time {
        font-size: 11px;
    }
    
    .gcal-event-title {
        font-size: 10px;
    }
}

/* ===============================================
   MODAL
   =============================================== */
.gcal-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 3000;
    display: flex;
    align-items: flex-end;
    padding: 0;
}

.gcal-modal-content {
    background: #1a1a2e;
    width: 100%;
    max-height: 80vh;
    border-radius: 20px 20px 0 0;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.gcal-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.gcal-modal-date {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.gcal-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #ffffff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.gcal-modal-close:active {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(0.95);
}

.gcal-modal-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gcal-modal-event {
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border-left: 4px solid;
}

.gcal-modal-event.training {
    border-left-color: #4285f4;
}

.gcal-modal-event.competition {
    border-left-color: #f4b400;
    background: rgba(244, 180, 0, 0.1);
}

.gcal-modal-event.event {
    border-left-color: #ea4335;
    background: rgba(234, 67, 53, 0.1);
}

.gcal-modal-event-time {
    font-size: 18px;
    font-weight: 700;
    color: #4285f4;
    margin-bottom: 8px;
}

.gcal-modal-event-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
}

.gcal-modal-event-group {
    font-size: 14px;
    opacity: 0.7;
    margin-bottom: 6px;
}

.gcal-modal-event-notes {
    font-size: 13px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-top: 8px;
}

.gcal-modal-empty {
    text-align: center;
    padding: 60px 20px;
    opacity: 0.5;
}

.gcal-modal-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

/* Mobile optimization */
