/* Agenda & Preekrooster Manager - Frontend Styles */
/* Huisstijl: Bruin/Goud thema geïnspireerd door Hervormd Otterlo */

:root {
    --apm-primary: #8B7355;
    --apm-primary-dark: #6B5744;
    --apm-primary-light: #A89070;
    --apm-secondary: #D4A574;
    --apm-accent: #C4956A;
    --apm-bg: #F8F6F3;
    --apm-bg-white: #FFFFFF;
    --apm-border: #E5DFD8;
    --apm-text: #3D3429;
    --apm-text-light: #7A7067;
    --apm-text-muted: #A09890;
    --apm-shadow: 0 2px 8px rgba(59, 52, 41, 0.08);
    --apm-shadow-lg: 0 8px 24px rgba(59, 52, 41, 0.12);
    --apm-radius: 8px;
    --apm-radius-lg: 12px;
}

/* Agenda Container */
.apm-agenda {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: var(--apm-text);
    line-height: 1.6;
}

.apm-agenda * {
    box-sizing: border-box;
}

/* Toolbar */
.apm-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    padding: 16px;
    background: var(--apm-bg-white);
    border-radius: var(--apm-radius-lg);
    box-shadow: var(--apm-shadow);
}

.apm-filters {
    display: flex;
    gap: 8px;
}

.apm-category-filter {
    padding: 10px 36px 10px 14px;
    border: 1px solid var(--apm-border);
    border-radius: var(--apm-radius);
    font-size: 14px;
    background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237A7067' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
    appearance: none;
    cursor: pointer;
    min-width: 160px;
}

.apm-category-filter:focus {
    outline: none;
    border-color: var(--apm-primary);
}

/* View Buttons */
.apm-view-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.apm-view-btn {
    padding: 8px 14px;
    border: 1px solid var(--apm-border);
    background: white;
    color: var(--apm-text-light);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--apm-radius);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.apm-view-btn:hover {
    background: var(--apm-bg);
    border-color: var(--apm-primary-light);
    color: var(--apm-text);
}

.apm-view-btn.active {
    background: var(--apm-primary);
    border-color: var(--apm-primary);
    color: white;
}

/* Custom tooltips for view toggle buttons */
.apm-view-toggle .apm-view-btn {
    position: relative;
}

.apm-view-toggle .apm-view-btn::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    padding: 6px 10px;
    background: var(--apm-text);
    color: white;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s, visibility 0.15s;
    pointer-events: none;
    z-index: 100;
}

.apm-view-toggle .apm-view-btn::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(2px);
    border: 5px solid transparent;
    border-top-color: var(--apm-text);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s, visibility 0.15s;
    pointer-events: none;
    z-index: 100;
}

.apm-view-toggle .apm-view-btn:hover::after,
.apm-view-toggle .apm-view-btn:hover::before {
    opacity: 1;
    visibility: visible;
}

.apm-current-period {
    font-size: 16px;
    font-weight: 600;
    color: var(--apm-text);
    min-width: 180px;
    text-align: center;
}

.apm-view-toggle {
    display: flex;
    gap: 4px;
}

/* Loading */
.apm-loading {
    display: flex;
    justify-content: center;
    padding: 40px;
}

.apm-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--apm-border);
    border-top-color: var(--apm-primary);
    border-radius: 50%;
    animation: apm-spin 0.8s linear infinite;
}

@keyframes apm-spin {
    to { transform: rotate(360deg); }
}

/* Content Area */
.apm-content {
    background: var(--apm-bg-white);
    border-radius: var(--apm-radius-lg);
    box-shadow: var(--apm-shadow);
    overflow: hidden;
}

/* List View */
.apm-list-view {
    padding: 0;
}

.apm-list-group {
    border-bottom: 1px solid var(--apm-border);
}

.apm-list-group:last-child {
    border-bottom: none;
}

.apm-list-date-header {
    padding: 12px 20px;
    background: var(--apm-bg);
    font-size: 14px;
    font-weight: 600;
    color: var(--apm-text);
    border-bottom: 1px solid var(--apm-border);
}

.apm-event-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--apm-border);
    cursor: pointer;
    transition: background 0.2s ease;
}

.apm-event-item:last-child {
    border-bottom: none;
}

.apm-event-item:hover {
    background: var(--apm-bg);
}

.apm-event-date-badge {
    flex-shrink: 0;
    width: 52px;
    text-align: center;
    padding: 8px 4px;
    background: var(--apm-primary);
    color: white;
    border-radius: var(--apm-radius);
}

.apm-event-date-badge.service {
    background: var(--apm-secondary);
}

.apm-date-badge-month {
    display: block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.apm-date-badge-day {
    display: block;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
}

.apm-date-badge-weekday {
    display: block;
    font-size: 10px;
    opacity: 0.8;
}

.apm-event-content {
    flex: 1;
    min-width: 0;
}

.apm-event-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--apm-text);
    margin: 0 0 4px 0;
}

.apm-event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: var(--apm-text-light);
}

.apm-event-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.apm-event-meta-item svg {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

.apm-event-summary {
    margin-top: 8px;
    font-size: 14px;
    color: var(--apm-text-light);
}

.apm-event-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.apm-event-category {
    display: inline-flex;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 99px;
    background: var(--apm-bg);
    color: var(--apm-text-light);
}

.apm-event-more {
    margin-left: auto;
    padding: 8px;
    color: var(--apm-text-muted);
    transition: color 0.2s;
}

.apm-event-item:hover .apm-event-more {
    color: var(--apm-primary);
}

/* Month View */
.apm-month-view {
    border: 1px solid var(--apm-border);
    border-radius: var(--apm-radius-lg);
    overflow: hidden;
}

.apm-calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--apm-bg);
    border-bottom: 1px solid var(--apm-border);
}

.apm-calendar-day-name {
    padding: 12px 8px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--apm-text-light);
}

.apm-calendar-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.apm-calendar-cell {
    min-height: 100px;
    border-right: 1px solid var(--apm-border);
    border-bottom: 1px solid var(--apm-border);
    padding: 8px;
    background: white;
}

.apm-calendar-cell:nth-child(7n) {
    border-right: none;
}

.apm-calendar-cell.other-month {
    background: var(--apm-bg);
}

.apm-calendar-cell.other-month .apm-calendar-date {
    color: var(--apm-text-muted);
}

.apm-calendar-cell.today {
    background: rgba(139, 115, 85, 0.05);
}

.apm-calendar-cell.today .apm-calendar-date {
    background: var(--apm-primary);
    color: white;
}

.apm-calendar-date {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 4px;
}

.apm-calendar-events {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.apm-calendar-event {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: transform 0.15s ease;
}

.apm-calendar-event:hover {
    transform: scale(1.02);
}

.apm-calendar-event.activity {
    background: #E8F4EA;
    color: #4A7C59;
}

.apm-calendar-event.service {
    background: #FDF4E7;
    color: #B8860B;
}

.apm-calendar-more {
    font-size: 11px;
    color: var(--apm-text-muted);
    padding: 2px 4px;
    cursor: pointer;
}

.apm-calendar-more:hover {
    color: var(--apm-primary);
}

/* Preekrooster Widget */
.apm-preekrooster {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.apm-preekrooster-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--apm-text);
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--apm-primary);
}

.apm-preekrooster-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.apm-preekrooster-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--apm-border);
}

.apm-preekrooster-item:last-child {
    border-bottom: none;
}

.apm-preekrooster-date {
    flex-shrink: 0;
    width: 44px;
    text-align: center;
    padding: 6px 4px;
    background: var(--apm-secondary);
    color: white;
    border-radius: var(--apm-radius);
}

.apm-preekrooster-date .apm-date-month {
    display: block;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.apm-preekrooster-date .apm-date-day {
    display: block;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
}

.apm-preekrooster-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.apm-preekrooster-time {
    font-size: 14px;
    font-weight: 600;
    color: var(--apm-text);
}

.apm-preekrooster-preacher {
    font-size: 14px;
    color: var(--apm-text);
}

.apm-preekrooster-location {
    font-size: 13px;
    color: var(--apm-text-light);
}

/* Upcoming Events Widget */
.apm-upcoming {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.apm-upcoming-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--apm-text);
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--apm-primary);
}

.apm-upcoming-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.apm-upcoming-item {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--apm-border);
}

.apm-upcoming-item:last-child {
    border-bottom: none;
}

.apm-upcoming-date {
    flex-shrink: 0;
    width: 48px;
    text-align: center;
    padding: 8px 4px;
    background: var(--apm-primary);
    color: white;
    border-radius: var(--apm-radius);
}

.apm-upcoming-date .apm-date-day {
    display: block;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.apm-upcoming-date .apm-date-month {
    display: block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.apm-upcoming-content {
    flex: 1;
    min-width: 0;
}

.apm-upcoming-item-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--apm-text);
    margin: 0 0 4px 0;
}

.apm-upcoming-meta {
    display: flex;
    gap: 12px;
    font-size: 13px;
    color: var(--apm-text-light);
}

.apm-upcoming-summary {
    margin-top: 6px;
    font-size: 14px;
    color: var(--apm-text-light);
}

/* Modal */
.apm-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.apm-modal.open {
    display: flex;
}

.apm-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.apm-modal-content {
    position: relative;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    background: white;
    border-radius: var(--apm-radius-lg);
    box-shadow: var(--apm-shadow-lg);
    overflow: hidden;
    animation: apm-modal-in 0.3s ease;
}

@keyframes apm-modal-in {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.apm-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: var(--apm-bg);
    color: var(--apm-text-light);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 1;
}

.apm-modal-close:hover {
    background: var(--apm-border);
    color: var(--apm-text);
}

.apm-modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: 90vh;
}

/* Modal Detail Content */
.apm-detail-header {
    margin-bottom: 20px;
}

.apm-detail-type {
    display: inline-flex;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    margin-bottom: 8px;
}

.apm-detail-type.activity {
    background: #E8F4EA;
    color: #4A7C59;
}

.apm-detail-type.service {
    background: #FDF4E7;
    color: #B8860B;
}

.apm-detail-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--apm-text);
    margin: 0 0 12px 0;
}

.apm-detail-datetime {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    color: var(--apm-primary);
    font-weight: 500;
}

.apm-detail-datetime svg {
    width: 20px;
    height: 20px;
}

.apm-detail-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--apm-border);
}

.apm-detail-section-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--apm-text-light);
    margin-bottom: 8px;
}

.apm-detail-info {
    display: grid;
    gap: 12px;
}

.apm-detail-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.apm-detail-row svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: var(--apm-text-light);
    margin-top: 2px;
}

.apm-detail-label {
    font-size: 13px;
    color: var(--apm-text-light);
}

.apm-detail-value {
    font-size: 15px;
    color: var(--apm-text);
}

.apm-detail-description {
    font-size: 15px;
    line-height: 1.7;
    color: var(--apm-text);
}

.apm-detail-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* No Items */
.apm-no-items {
    text-align: center;
    padding: 40px 20px;
    color: var(--apm-text-light);
}

.apm-no-items-day {
    text-align: center;
    padding: 30px 20px;
    color: var(--apm-text-muted);
    font-style: italic;
}

/* Day View - Timeline */
.apm-day-view {
    background: var(--apm-bg-white);
    border-radius: var(--apm-radius-lg);
    border: 1px solid var(--apm-border);
    overflow: hidden;
}

.apm-day-header {
    padding: 16px 20px;
    background: var(--apm-bg);
    border-bottom: 1px solid var(--apm-border);
}

.apm-day-date {
    font-size: 16px;
    font-weight: 600;
    color: var(--apm-text);
}

/* All-day events section */
.apm-day-allday {
    display: flex;
    padding: 12px 20px;
    border-bottom: 1px solid var(--apm-border);
    background: var(--apm-bg);
    gap: 16px;
    align-items: center;
}

.apm-day-allday-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--apm-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 60px;
}

.apm-day-allday-events {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.apm-day-allday-event {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.apm-day-allday-event:hover {
    transform: scale(1.02);
}

.apm-day-allday-event.activity {
    background: #E8F4EA;
    color: #4A7C59;
}

.apm-day-allday-event.service {
    background: #FDF4E7;
    color: #B8860B;
}

/* Timeline layout */
.apm-day-timeline {
    display: flex;
    min-height: 600px;
    max-height: 800px;
    overflow-y: auto;
}

.apm-timeline-hours {
    flex-shrink: 0;
    width: 60px;
    border-right: 1px solid var(--apm-border);
    background: var(--apm-bg);
}

.apm-timeline-hour {
    height: calc(100% / 17); /* 17 hours from 6-22 */
    min-height: 50px;
    position: relative;
}

.apm-timeline-hour-label {
    position: absolute;
    top: -8px;
    right: 12px;
    font-size: 11px;
    font-weight: 500;
    color: var(--apm-text-muted);
    background: var(--apm-bg);
    padding: 0 4px;
}

.apm-timeline-hour:first-child .apm-timeline-hour-label {
    top: 4px;
}

/* Timeline content area */
.apm-timeline-content {
    flex: 1;
    position: relative;
    min-height: 850px; /* 17 hours * 50px */
}

.apm-timeline-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.apm-timeline-grid-line {
    height: calc(100% / 17);
    min-height: 50px;
    border-bottom: 1px solid var(--apm-border);
}

.apm-timeline-grid-line:last-child {
    border-bottom: none;
}

/* Current time indicator - subtle, behind cards */
.apm-timeline-now {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 1;
    pointer-events: none;
}

.apm-timeline-now-dot {
    position: absolute;
    left: -4px;
    top: -4px;
    width: 8px;
    height: 8px;
    background: #E57373;
    border-radius: 50%;
    opacity: 0.8;
}

.apm-timeline-now-line {
    height: 1px;
    background: #E57373;
    opacity: 0.6;
}

/* Timeline events */
.apm-timeline-events {
    position: absolute;
    inset: 0;
    padding: 0 12px 0 8px;
}

.apm-timeline-event {
    position: absolute;
    left: 8px;
    right: 12px;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    border-left: 4px solid;
}

.apm-timeline-event:hover {
    transform: translateX(2px);
    box-shadow: var(--apm-shadow);
}

/* Event color variations - light pastel colors */
.apm-timeline-event.color-0 {
    background: #FFF8E7;
    border-color: #D4A574;
    color: #5D4E37;
}

.apm-timeline-event.color-1 {
    background: #E8F4EA;
    border-color: #6B8E23;
    color: #3D5214;
}

.apm-timeline-event.color-2 {
    background: #E7F3FF;
    border-color: #4682B4;
    color: #2C5272;
}

.apm-timeline-event.color-3 {
    background: #F5EEF8;
    border-color: #9370DB;
    color: #5B3D7A;
}

.apm-timeline-event.color-4 {
    background: #FFF0F0;
    border-color: #CD5C5C;
    color: #7A3535;
}

.apm-timeline-event.color-5 {
    background: #F0F8F0;
    border-color: #2E8B57;
    color: #1D5637;
}

.apm-timeline-event-time {
    font-size: 11px;
    font-weight: 600;
    opacity: 0.8;
    margin-bottom: 2px;
}

.apm-timeline-event-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.apm-timeline-event-location {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Week View */
.apm-week-view {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--apm-border);
    border: 1px solid var(--apm-border);
    border-radius: var(--apm-radius-lg);
    overflow: hidden;
}

.apm-week-day {
    background: var(--apm-bg-white);
    min-height: 150px;
}

.apm-week-day.today {
    background: rgba(139, 115, 85, 0.05);
}

.apm-week-day.today .apm-week-day-header {
    background: var(--apm-primary);
    color: white;
}

.apm-week-day-header {
    padding: 10px 8px;
    background: var(--apm-bg);
    border-bottom: 1px solid var(--apm-border);
    text-align: center;
}

.apm-week-day-name {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.apm-week-day-date {
    display: block;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
}

.apm-week-day-events {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.apm-week-no-events {
    text-align: center;
    color: var(--apm-text-muted);
    font-size: 13px;
}

.apm-week-event {
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.apm-week-event:hover {
    transform: scale(1.02);
}

.apm-week-event.activity {
    background: #E8F4EA;
    color: #4A7C59;
}

.apm-week-event.service {
    background: #FDF4E7;
    color: #B8860B;
}

.apm-week-event-time {
    display: block;
    font-size: 10px;
    font-weight: 600;
    opacity: 0.8;
}

.apm-week-event-title {
    display: block;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Detail Actions */
.apm-detail-actions {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--apm-border);
}

.apm-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: var(--apm-radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.apm-btn-primary {
    background: var(--apm-primary);
    color: white;
}

.apm-btn-primary:hover {
    background: var(--apm-primary-dark);
}

/* Add to Calendar Dropdown */
.apm-calendar-dropdown {
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: 8px;
    z-index: 100;
}

.apm-calendar-dropdown-content {
    background: white;
    border: 1px solid var(--apm-border);
    border-radius: var(--apm-radius);
    box-shadow: var(--apm-shadow-lg);
    min-width: 180px;
    overflow: hidden;
}

.apm-calendar-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--apm-text);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.15s;
}

.apm-calendar-dropdown a:hover {
    background: var(--apm-bg);
}

.apm-calendar-dropdown a svg {
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .apm-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .apm-view-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .apm-current-period {
        min-width: auto;
    }
    
    .apm-calendar-cell {
        min-height: 80px;
        padding: 4px;
    }
    
    .apm-calendar-date {
        width: 24px;
        height: 24px;
        font-size: 11px;
    }
    
    .apm-calendar-event {
        font-size: 10px;
        padding: 2px 4px;
    }
    
    .apm-event-item {
        flex-direction: column;
        gap: 12px;
    }
    
    .apm-event-date-badge {
        width: auto;
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 12px;
    }
    
    .apm-date-badge-day {
        font-size: 18px;
    }
    
    .apm-modal-content {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .apm-week-view {
        grid-template-columns: 1fr;
    }
    
    .apm-week-day {
        min-height: auto;
    }
    
    .apm-week-day-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 16px;
    }
    
    .apm-week-day-name,
    .apm-week-day-date {
        display: inline;
        font-size: 14px;
    }
    
    .apm-view-toggle {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
    }
}
