/* Calendar Module Styles */

.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.view-controls {
    display: flex;
    gap: 0.5rem;
    background: var(--bg-secondary);
    padding: 0.25rem;
    border-radius: 6px;
}

.view-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.view-btn:hover {
    background: rgba(164, 124, 91, 0.1);
}

.view-btn.active {
    background: var(--accent-tan);
    color: white;
}

.date-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.date-controls h2 {
    font-size: 1.25rem;
    font-weight: 400;
    min-width: 200px;
    text-align: center;
}

.location-filter {
    margin-right: 1rem;
}

.location-filter select {
    min-width: 150px;
}

.legend {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.legend-item i {
    font-size: 0.75rem;
}

/* Calendar Grid */
.calendar-view {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.5rem;
    min-height: 900px;
    overflow-x: auto;
}

/* Larger container for day view */
.calendar-view:has(.day-view) {
    min-height: 1400px;
    padding: 3rem;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(180px, 1fr));
    gap: 2px;
    background: var(--border-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    min-width: 1260px;
}

.calendar-header {
    background: var(--bg-tertiary);
    padding: 1.5rem;
    text-align: center;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 1rem;
}

.calendar-day {
    background: var(--bg-primary);
    min-height: 180px;
    padding: 0.75rem;
    position: relative;
    transition: background 0.2s;
    cursor: pointer;
}

.calendar-day:hover {
    background: rgba(164, 124, 91, 0.05);
}

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

.calendar-day.today {
    background: rgba(239, 68, 68, 0.05);
}

.calendar-day.today .day-number {
    background: #ef4444;
    color: white;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    position: relative;
    margin: -7px auto 0.5rem -7px;
}

.day-number {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* Calendar Events */
.calendar-event {
    background: var(--status-new);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    font-weight: 500;
}

.calendar-event:hover {
    transform: translateX(2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 10;
    position: relative;
}

.calendar-event.type-campaign { background: #3b82f6; }
.calendar-event.type-special { background: #10b981; }
.calendar-event.type-holiday { background: #f59e0b; }
.calendar-event.type-promotion { background: #8b5cf6; }
.calendar-event.type-internal { background: #6b7280; }

/* Week View */
.week-list-view {
    padding: 1rem;
}

.week-list-view h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.week-day-section {
    margin-bottom: 2rem;
}

.week-day-section h4 {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.week-events {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.week-event {
    background: var(--bg-tertiary);
    padding: 0.75rem 1rem;
    border-radius: 6px;
    display: flex;
    gap: 1rem;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 4px solid;
}

.week-event:hover {
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.week-event.type-campaign { border-left-color: #3b82f6; }
.week-event.type-special { border-left-color: #10b981; }
.week-event.type-holiday { border-left-color: #f59e0b; }
.week-event.type-promotion { border-left-color: #8b5cf6; }
.week-event.type-internal { border-left-color: #6b7280; }

.event-time {
    font-weight: 500;
    color: var(--text-secondary);
    min-width: 80px;
}

.event-title {
    flex: 1;
    color: var(--text-primary);
}

.event-location {
    font-size: 0.875rem;
    color: var(--text-muted);
    background: var(--bg-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
}

/* List View */
.list-view {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.list-date-group {
    margin-bottom: 1.5rem;
}

.list-date-header {
    font-size: 1.375rem;
    font-weight: 600;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
    color: #dc2626;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #fecaca;
    letter-spacing: 0.025em;
}

.list-event {
    background: var(--bg-tertiary);
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.list-event:hover {
    border-color: var(--accent-tan);
    transform: translateY(-2px);
}

.list-event-content {
    flex: 1;
}

.list-event-title {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.list-event-meta {
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: flex;
    gap: 1rem;
}

/* Make dates stand out in list view */
.list-event-meta span:first-child {
    font-size: 1.125rem;
    font-weight: 600;
    color: #ec4899;
}

.list-event-meta span:first-child i {
    color: #f472b6;
    margin-right: 0.5rem;
}

.list-event-actions {
    display: flex;
    gap: 0.5rem;
}

/* Form Styles */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Event Details */
.event-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.detail-label {
    font-weight: 500;
    color: var(--text-secondary);
}

.detail-value {
    color: var(--text-primary);
}

/* Drag and Drop */
.calendar-event.dragging {
    opacity: 0.5;
}

.calendar-day.drag-over {
    background: rgba(164, 124, 91, 0.2);
    border: 2px dashed var(--accent-tan);
}

/* Reminder Styles */
.reminders-container {
    background: var(--bg-tertiary);
    padding: 1rem;
    border-radius: 6px;
    margin-top: 0.5rem;
}

.reminder-options {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.reminder-options select {
    flex: 1;
}

.reminders-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.reminder-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-secondary);
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
}

.reminder-item .reminder-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
}

.reminder-item .reminder-text i {
    color: var(--accent-tan);
}

.reminder-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s;
}

.reminder-remove:hover {
    color: #ef4444;
}

/* Reminder Notifications */
.reminder-notifications {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1500;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 400px;
}

.reminder-notification {
    background: white;
    color: #1f2937;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border-left: 4px solid var(--accent-tan);
    animation: slideInRight 0.3s ease;
    position: relative;
    min-width: 300px;
}

.reminder-notification.urgent {
    border-left-color: #ef4444;
}

.reminder-notification-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.5rem;
}

.reminder-notification-title {
    font-weight: 600;
    font-size: 1rem;
    color: #111827;
}

.reminder-notification-close {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    padding: 0;
    margin-left: 1rem;
}

.reminder-notification-close:hover {
    color: #374151;
}

.reminder-notification-body {
    color: #4b5563;
    font-size: 0.875rem;
}

.reminder-notification-meta {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #6b7280;
}

.reminder-notification-meta i {
    margin-right: 0.25rem;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .calendar-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .date-controls {
        justify-content: center;
    }
    
    .calendar-grid {
        font-size: 0.875rem;
    }
    
    .calendar-day {
        min-height: 80px;
    }
    
    .calendar-event {
        font-size: 0.7rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .reminder-notifications {
        top: 60px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .reminder-notification {
        min-width: auto;
    }
}

/* Day View Styles */
.day-view {
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem;
}

.day-view-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.day-view-header h3 {
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--text-primary);
}

.day-events-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.day-section {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.day-section-title {
    font-size: 1.375rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.75px;
}

.day-event {
    background: var(--bg-primary);
    border-radius: 10px;
    padding: 2rem 2.5rem;
    margin-bottom: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--border-color);
}

.day-event:last-child {
    margin-bottom: 0;
}

.day-event:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.day-event-time {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.day-event-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.day-event-title {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-primary);
    flex: 1;
}

.day-event-location {
    font-size: 1.125rem;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    background: rgba(164, 124, 91, 0.1);
    border-radius: 6px;
}

.day-event-description {
    margin-top: 1rem;
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Day view event type colors */
.day-event.type-campaign {
    border-left: 4px solid #3b82f6;
}

.day-event.type-special {
    border-left: 4px solid #10b981;
}

.day-event.type-holiday {
    border-left: 4px solid #f59e0b;
}

.day-event.type-promotion {
    border-left: 4px solid #8b5cf6;
}

.day-event.type-event {
    border-left: 4px solid #ec4899;
}

.day-event.type-internal {
    border-left: 4px solid #6b7280;
}

/* Today's date highlight with pulsing animation */
@keyframes pulse-today {
    0% {
        box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 2px 16px rgba(239, 68, 68, 0.6);
        transform: scale(1.05);
    }
    100% {
        box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
        transform: scale(1);
    }
}

.calendar-day.today .day-number {
    animation: pulse-today 2s ease-in-out infinite;
}

/* Ensure today's date stands out even more on hover */
.calendar-day.today:hover {
    background: rgba(239, 68, 68, 0.1);
}

.calendar-day.today:hover .day-number {
    animation: none;
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.8);
}