/**
 * Tools CSS - Styling for GematriaLens Tools
 * 
 * Predictive Calendar specific styles
 */

/* ========== Predictive Calendar ========== */

/* Calendar Container */
.calendar-container {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 20px;
    justify-content: center;
}

/* Individual Month */
.calendar-month {
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.2s;
    width: 240px;
    flex-shrink: 0;
}

.calendar-month:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.calendar-month-header {
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
    color: #333;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #00FFFF;
}

/* Days Grid */
.calendar-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}

/* Day Headers (Sun, Mon, etc.) */
.calendar-day-header {
    text-align: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: #888;
    padding: 4px 2px;
    text-transform: uppercase;
}

/* Day Cells */
.calendar-day-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    border-radius: 3px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    cursor: default;
    transition: all 0.15s ease;
    position: relative;
    font-weight: 500;
    color: #666;
}

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

/* Highlighted Dates (with matches) */
.calendar-day-cell.has-match {
    color: #fff;
    font-weight: 700;
    border: 2px solid rgba(0, 0, 0, 0.2);
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.calendar-day-cell.has-match:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    z-index: 100;
}

.calendar-day-cell.has-match.multiple-matches {
    border: 2px solid #ffc107;
    box-shadow: 0 0 6px rgba(255, 193, 7, 0.6);
}

.calendar-day-cell.has-match.multiple-matches:hover {
    box-shadow: 0 0 10px rgba(255, 193, 7, 1);
}

/* Database match indicator - double border effect */
.calendar-day-cell.has-db-match {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #4CAF50, 0 1px 3px rgba(0, 0, 0, 0.15);
}

.calendar-day-cell.has-db-match:hover {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #4CAF50, 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Tooltip styling using data-tooltip attribute */
.calendar-day-cell.has-tooltip {
    cursor: pointer;
}

.calendar-day-cell.has-tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    background: rgba(0, 0, 0, 0.95);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    white-space: pre-line;
    font-size: 0.7rem;
    z-index: 1000;
    min-width: 200px;
    max-width: 320px;
    pointer-events: none;
    text-align: left;
    font-weight: normal;
    line-height: 1.4;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.calendar-day-cell.has-tooltip:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    pointer-events: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .calendar-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .calendar-month {
        padding: 10px;
    }
    
    .calendar-day-cell {
        font-size: 0.75rem;
    }
    
    .calendar-day-header {
        font-size: 0.65rem;
    }
}

@media (min-width: 1200px) {
    .calendar-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1600px) {
    .calendar-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

