/* Pharmacy Schedule - Frontend Styles */

/* Main Container */
.ps-calendar-container {
    max-width: 700px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Calendar Header */
.ps-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    background-color: #4aaeb6;
    color: #ffffff;
    padding: 15px 20px;
    border-radius: 6px;
}

.ps-month-title {
    margin: 0;
    font-size: 30px !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ffffff;
}

/* Navigation Buttons */
.ps-nav-button {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    font-size: 1.8rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}

.ps-nav-button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

.ps-nav-button:active:not(:disabled) {
    transform: scale(0.95);
}

.ps-nav-button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.ps-nav-button:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* Weekday Headers */
.ps-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.ps-weekday {
    text-align: center;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    color: #333333;
    padding: 8px 0;
    letter-spacing: 0.5px;
}

.ps-weekday.ps-weekend {
    color: #e74c3c;
}

/* Calendar Grid */
.ps-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 20px;
    min-height: 300px;
}

/* Calendar Day Cells */
.ps-day {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333333;
    background-color: #f5f5f5;
    border-radius: 4px;
    transition: transform 0.2s ease;
    position: relative;
}

.ps-day.ps-empty {
    background-color: transparent;
}

.ps-day:not(.ps-empty):hover {
    transform: scale(1.05);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    z-index: 1;
}

/* Pharmacy Colors */
.ps-day.ps-pharmacy-1 {
    background-color: #e74031;
    color: #ffffff;
}

.ps-day.ps-pharmacy-2 {
    background-color: #4f4f46;
    color: #ffffff;
}

.ps-day.ps-pharmacy-3 {
    background-color: #029999;
    color: #ffffff;
}

/* Today Indicator */
.ps-day.ps-today {
    border: 3px solid #f39c12;
    font-weight: 700;
}

/* Legend */
.ps-legend {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 6px;
    margin-top: 15px;
}

.ps-legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: #333333;
}

.ps-legend-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ps-legend-name {
	text-align: left !important;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.2;
}

.ps-legend-address {
    font-size: 0.8rem;
    color: #666666;
    font-weight: 400;
    line-height: 1.2;
}

.ps-legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: inline-block;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.ps-legend-color.ps-color-1 {
    background-color: #e74031;
}

.ps-legend-color.ps-color-2 {
    background-color: #4f4f46;
}

.ps-legend-color.ps-color-3 {
    background-color: #029999;
}

/* Loading State */
.ps-calendar-grid.ps-loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Responsive Design */
@media (max-width: 768px) {
	.ps-calendar-grid {
		min-height: inherit !important;
	}
	
    .ps-calendar-container {
        padding: 15px;
    }
	
	.ps-calendar-grid {
		min-height: 100px !important;
	}
	
	.ps-calendar-header {
		text-align: center;
	}

    .ps-month-title {
        font-size: 22px !important;
    }

    .ps-nav-button {
        width: 35px;
        height: 35px;
        font-size: 1.5rem;
    }

    .ps-weekday {
        font-size: 0.75rem;
        padding: 5px 0;
    }

    .ps-day {
        font-size: 0.95rem;
    }

    .ps-legend {
        gap: 15px;
    }

    .ps-legend-item {
        gap: 8px;
    }

    .ps-legend-name {
		text-align: left;
        font-size: 0.85rem;
    }

    .ps-legend-address {
        font-size: 0.72rem;
    }

    .ps-legend-color {
        width: 18px;
        height: 18px;
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    .ps-calendar-container {
        padding: 10px;
    }

    .ps-calendar-header {
        padding: 10px 15px;
		text-align: center;
    }

    .ps-month-title {
        font-size: 22px !important;
    }

    .ps-nav-button {
        width: 30px;
        height: 30px;
        font-size: 1.3rem;
    }

    .ps-weekday {
        font-size: 0.65rem;
    }

    .ps-day {
        font-size: 0.85rem;
    }

    .ps-calendar-grid {
        gap: 2px;
		min-height: 100px !important;
    }

    .ps-legend {
        gap: 12px;
        padding: 12px;
    }

    .ps-legend-item {
        gap: 8px;
        width: 100%;
    }

    .ps-legend-name {
		text-align: left;
        font-size: 0.8rem;
    }

    .ps-legend-address {
        font-size: 0.7rem;
    }

    .ps-legend-color {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
    }
}

/* Accessibility */
.ps-calendar-container:focus-within {
    outline: 2px solid #4aaeb6;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .ps-nav-button,
    .ps-day {
        transition: none;
    }
}

/* Print Styles */
@media print {
    .ps-calendar-header {
        background-color: #4aaeb6 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .ps-nav-button {
        display: none;
    }

    .ps-day.ps-pharmacy-1,
    .ps-day.ps-pharmacy-2,
    .ps-day.ps-pharmacy-3 {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
