/* Calendar Container */
#visit-calendar-container {
    border: 1px solid #e2e4e7;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 20px 0;
    overflow: hidden;
    width: 100%;
	background: white;
}

/* Calendar Header */
.calendar-header {
    align-items: center;
    background: #f7f7f7;
    border-bottom: 1px solid #e2e4e7;
    display: flex;
    justify-content: space-between;
    padding: 15px;
}

.month-year-label {
    font-size: 18px;
    font-weight: bold;
    text-align: center;
}

.nav-button {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    height: 36px;
    width: 36px;
}

.nav-button:hover {
    background: #f0f0f0;
}

.nav-button:disabled {
    background: #f7f7f7;
    border-color: #eee;
    color: #ccc;
    cursor: not-allowed;
}

/* Days Header */
.days-header {
    background: #f9f9f9;
    border-bottom: 1px solid #e2e4e7;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.day-name {
    font-size: 14px;
    font-weight: bold;
    padding: 10px;
    text-align: center;
}

/* Calendar Grid */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.calendar-grid div {
    height: 60px;
    width: 100%;
}



/* Day Cell */
.day {
    aspect-ratio: 1;
/* border: 1px solid #f0f0f0; */
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    position: relative;
    transition: background-color 0.2s ease;
}

.day:hover:not(.disabled) {
    background: #f7f7f7;
}

.day.empty {
    background: #f9f9f9;
    border: none;
}

.day-number {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    font-weight: bold;
}

/* Special Day States - Sin textos pero con círculos de colores */
.day.today .day-number {
    font-weight: 900;
}

.day.past .day-number {
    background: #ffffff;
    color: #aaaaaa;
}

.day.closed .day-number {
    background: #ea384c;
    color: white;
}

.day:not(.disabled):not(.selected):not(.past):not(.closed) .day-number {
    background: #40DD7F;
    color: white;
}

.day.selected .day-number {
    background: #1EAEDB;
    color: white;
}

.day.disabled {
    cursor: not-allowed;
    opacity: 1;
}

/* Legend */
.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 10px;
    padding: 10px;
    border-top: 1px solid #e2e4e7;
}

.legend-item {
    display: flex;
    align-items: center;
    font-size: 12px;
}

.legend-color {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    margin-right: 5px;
}

.legend-color.red {
    background: #ea384c;
}

.legend-color.green {
    background: #40DD7F;
}

.legend-color.blue {
    background: #1EAEDB;
}

/* Hide visit date input field */
.visit-date-input {
    display: none !important;
}

#visit-date-field .form-row label {
    display: none !important;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .day-name {
        font-size: 12px;
        padding: 5px;
    }
    
    .day-number {
        font-size: 12px;
        width: 30px;
        height: 30px;
    }
    
    .legend-item {
        font-size: 10px;
    }
}

#visit-date-review {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    border: 1px solid #e3e8f2;
}

#visit-date-review h3 {
    color: #2d3748;
    font-size: 1rem;
    margin: 0 0 0.5rem 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#visit-date-review h3::before {
    content: '📅';
    font-size: 0.9em;
    opacity: 0.8;
}

#selected-visit-date {
    color: #4a5568;
    font-size: 0.95rem;
    margin: 0;
    padding: 0.5rem 0;
    font-weight: 500;
    line-height: 1.4;
}

/* Versión compacta para pantallas pequeñas */
@media (max-width: 768px) {
    #visit-date-review {
        padding: 0.75rem;
        margin: 0.75rem 0;
    }
	.calendar-grid div {
		height:40px !important;
	}
	.day-number {
  
    width: 30px;
    height: 30px;

	}
	.calendar-legend {
		gap: 10px;
	}	
}

@media (max-width: 335px) {
    .calendar-grid div {
        height: 35px !important;
    }
}

p#selected-visit-date:first-letter {
    text-transform: capitalize;
}

.day.past.disabled .day-number {
    font-weight: 400;
}

/* ============================================================================
   UKUMARÍ: Banner instructivo para selección de fecha (UX Enhancement)
   ============================================================================ */

.calendar-instruction-banner {
    background: linear-gradient(135deg, rgba(110, 178, 33, 0.08) 0%, rgba(110, 178, 33, 0.05) 100%);
    border: 1px solid rgba(110, 178, 33, 0.2);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInDown 0.4s ease-out;
    transition: all 0.3s ease;
}

.calendar-instruction-banner.hidden {
    opacity: 0;
    max-height: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

.calendar-instruction-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: rgba(110, 178, 33, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: gentlePulse 2s ease-in-out infinite;
}

.calendar-instruction-icon svg {
    width: 18px;
    height: 18px;
    color: #6EB221;
}

.calendar-instruction-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    color: #0C3026;
    font-weight: 500;
}

.calendar-instruction-text strong {
    font-weight: 700;
    color: #6EB221;
}

.calendar-instruction-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 20px;
    line-height: 1;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-instruction-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #374151;
}

/* Animación sutil de pulse para el ícono */
@keyframes gentlePulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

/* Animación de entrada */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Efecto sutil de brillo en fechas disponibles (primera carga) */
.day.available.highlight-hint {
    animation: subtleGlow 2s ease-in-out 3;
}

@keyframes subtleGlow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(110, 178, 33, 0);
    }
    50% {
        box-shadow: 0 0 0 3px rgba(110, 178, 33, 0.15);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .calendar-instruction-banner {
        padding: 10px 12px;
        gap: 10px;
    }
    
    .calendar-instruction-icon {
        width: 28px;
        height: 28px;
    }
    
    .calendar-instruction-icon svg {
        width: 16px;
        height: 16px;
    }
    
    .calendar-instruction-text {
        font-size: 13px;
    }
}
