/**
 * Saints Calendar Plugin Styles
 * Version: 1.0.0
 */

/* Main Calendar Wrapper */
.saints-calendar-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.calendar-header {
    text-align: center;
    margin-bottom: 30px;
}

.calendar-header h1 {
    font-size: 2.5em;
    color: #333;
}

/* Today's Saint Sidebar */
.today-saint-sidebar {
    max-width: 400px;
    margin: 0 auto 40px;
}

.today-saint {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.today-saint h3 {
    margin-top: 0;
    font-size: 1.4em;
    margin-bottom: 15px;
}

.today-saint .saint-thumb {
    margin: 15px 0;
}

.today-saint .saint-thumb img {
    border-radius: 50%;
    border: 4px solid white;
    width: 120px;
    height: 120px;
    object-fit: cover;
}

.today-saint h4 {
    font-size: 1.2em;
    margin: 15px 0 10px;
}

.today-saint a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

.today-saint a:hover {
    text-decoration: underline;
}

/* Calendar Grid Container */
.calendar-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

/* Individual Month Calendar */
.month-calendar {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.month-title {
    text-align: center;
    color: #667eea;
    font-size: 1.5em;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

/* Calendar Grid */
.calendar-grid {
    display: flex;
    flex-direction: column;
}

.calendar-header-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 5px;
}

.calendar-day-name {
    text-align: center;
    font-weight: bold;
    font-size: 0.85em;
    color: #666;
    padding: 8px 4px;
}

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

/* Individual Day Cell */
.calendar-day {
    aspect-ratio: 1;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 4px;
    text-align: center;
    position: relative;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.calendar-day.empty {
    background: transparent;
    border: none;
}

.calendar-day .day-number {
    font-size: 0.9em;
    color: #666;
}

.calendar-day.has-saint {
    background: #e8eaf6;
    border-color: #667eea;
    cursor: pointer;
    font-weight: bold;
}

.calendar-day.has-saint .day-number {
    color: #667eea;
}

.calendar-day.today {
    background: #667eea;
    border-color: #667eea;
}

.calendar-day.today .day-number {
    color: white;
    font-weight: bold;
}

.calendar-day.has-saint.today {
    background: #764ba2;
    border-color: #764ba2;
}

.calendar-day.has-saint:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    z-index: 10;
}

/* Tooltip for Saints */
.saints-tooltip {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border: 2px solid #667eea;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 100;
    min-width: 200px;
    margin-bottom: 8px;
    white-space: normal;
}

.calendar-day.has-saint:hover .saints-tooltip {
    display: block;
}

.saints-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #667eea;
}

.saint-entry {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.saint-entry:last-child {
    border-bottom: none;
}

.saint-entry img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
    vertical-align: middle;
}

.saint-entry a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95em;
}

.saint-entry a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .calendar-grid-container {
        grid-template-columns: 1fr;
    }
    
    .month-calendar {
        padding: 15px;
    }
    
    .calendar-day {
        font-size: 0.85em;
    }
    
    .saints-tooltip {
        position: fixed;
        left: 10px !important;
        right: 10px;
        bottom: 10px !important;
        top: auto !important;
        transform: none !important;
        min-width: auto;
    }
    
    .saints-tooltip::after {
        display: none;
    }
}