/* Pagan Calendar Widget - Main Styles */

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Widget container */
.calendar-widget {
    max-width: 800px;
    margin: 0 auto;
    background: var(--widget-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

/* Header styles */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--header-bg);
    border-bottom: 1px solid var(--border-color);
}

.calendar-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: var(--accent-hover);
    transform: scale(1.05);
}

.current-month {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    min-width: 200px;
    text-align: center;
}

.calendar-controls {
    display: flex;
    gap: 0.5rem;
}

.control-btn {
    background: var(--secondary-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.control-btn:hover {
    background: var(--accent-color);
    color: white;
}

/* Moon phase display */
.moon-phase-display {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: var(--moon-phase-bg);
    border-bottom: 1px solid var(--border-color);
}

.moon-icon {
    font-size: 2rem;
    filter: drop-shadow(0 0 8px var(--moon-glow));
}

.moon-info {
    display: flex;
    flex-direction: column;
}

.moon-phase-name {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.moon-illumination {
    font-size: 0.9rem;
    color: var(--secondary-text);
}

/* Event legend */
.event-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 1rem;
    background: var(--legend-bg);
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.legend-icon {
    font-size: 1.2rem;
}

.legend-icon.sabbath {
    color: var(--sabbath-color);
}

.legend-icon.new-moon {
    color: var(--new-moon-color);
}

.legend-icon.full-moon {
    color: var(--full-moon-color);
}

.legend-icon.eclipse {
    color: var(--eclipse-color);
}

/* Modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--widget-bg);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    color: var(--primary-color);
    font-size: 1.3rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--secondary-text);
    padding: 0.25rem;
}

.close-btn:hover {
    color: var(--text-color);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    text-align: right;
}

/* Settings modal specific styles */
.settings-section {
    margin-bottom: 2rem;
}

.settings-section h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

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

.theme-options label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.theme-options label:hover {
    background: var(--accent-light);
}

.theme-options input[type="radio"]:checked + label {
    background: var(--accent-color);
    color: white;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    margin-bottom: 0.5rem;
    padding: 0.5rem 0;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

/* Button styles */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

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

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

.btn-secondary {
    background: var(--secondary-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--accent-light);
}

/* Notes section */
.notes-section {
    margin-top: 2rem;
}

.notes-section h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.notes-section textarea {
    width: 100%;
    min-height: 120px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--input-bg);
    color: var(--text-color);
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    margin-bottom: 1rem;
}

.notes-section textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--accent-light);
}

/* Responsive design */
@media (max-width: 768px) {
    .calendar-widget {
        margin: 1rem;
        border-radius: 8px;
    }
    
    .calendar-header {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .current-month {
        font-size: 1.3rem;
        min-width: auto;
    }
    
    .event-legend {
        gap: 1rem;
    }
    
    .legend-item {
        font-size: 0.8rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
}

@media (max-width: 480px) {
    .calendar-nav {
        gap: 0.5rem;
    }
    
    .nav-btn {
        width: 35px;
        height: 35px;
    }
    
    .current-month {
        font-size: 1.1rem;
    }
    
    .moon-phase-display {
        padding: 0.75rem 1rem;
    }
    
    .event-legend {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
}
