/**
 * Birthday Calendar - Frontend Styles
 *
 * @package Birthday_Calendar
 * @since   1.0.0
 */

/* Contenedor del widget */
.bc-widget-accordion {
	margin-bottom: 15px;
	border: 1px solid #ddd;
	border-radius: 4px;
	overflow: hidden;
}

/* Header del acordeón */
.bc-accordion-header {
	background: #f7f7f7;
	padding: 12px 15px;
	cursor: pointer;
	display: flex;
	justify-content: space-between;
	align-items: center;
	transition: background 0.3s ease;
	user-select: none;
}

.bc-accordion-header:hover {
	background: #e9e9e9;
}

.bc-accordion-header.active {
	background: #0073aa;
	color: #fff;
}

.bc-date-label {
	font-weight: 600;
	font-size: 14px;
}

.bc-toggle-icon {
	display: inline-flex;
	align-items: center;
	line-height: 1;
}

.bc-toggle-icon svg {
	fill: #333;
	transition: transform 0.2s ease;
}

.bc-toggle-icon svg path {
	fill: inherit;
}

.bc-toggle-icon .bc-icon-plus {
	display: inline-block;
}

.bc-toggle-icon .bc-icon-minus {
	display: none;
}

.bc-accordion-header.active .bc-toggle-icon .bc-icon-plus {
	display: none;
}

.bc-accordion-header.active .bc-toggle-icon .bc-icon-minus {
	display: inline-block;
}

/* Contenido del acordeón */
.bc-accordion-content {
	padding: 15px;
	background: #fff;
}

/* Galería */
.bc-gallery {
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
	justify-content: center;
}

/* Item de galería */
.bc-gallery-item {
	position: relative;
	overflow: hidden;
	border-radius: 4px;
	aspect-ratio: 1;
}

.bc-gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
	transition: transform 0.3s ease;
}

/* Overlay */
.bc-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.8);
	color: #fff;
	padding: 10px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	text-align: center;
}

.bc-caption {
	font-weight: 600;
	margin-bottom: 5px;
	font-size: 14px;
}

.bc-description {
	font-size: 12px;
	line-height: 1.4;
}

/* Lista de mes (shortcode) */
.bc-month-list {
	margin: 20px 0;
}

.bc-month-title {
	font-size: 24px;
	margin-bottom: 20px;
	padding-bottom: 10px;
	border-bottom: 2px solid #0073aa;
}

.bc-day-item {
	margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {
	.bc-gallery {
		grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
		gap: 10px;
	}
}

@media (max-width: 480px) {
	.bc-gallery {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* Widget de búsqueda */
.bc-search-widget {
	margin-bottom: 20px;
}

.bc-search-form {
	display: flex;
	gap: 10px;
	margin-bottom: 10px;
}

.bc-search-input {
	flex: 1;
	padding: 10px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
}

.bc-search-input:focus {
	outline: none;
	border-color: #0073aa;
	box-shadow: 0 0 0 1px #0073aa;
}

.bc-search-button {
	padding: 10px 20px;
	background: #0073aa;
	color: #fff;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	transition: background 0.3s ease;
}

.bc-search-button:hover {
	background: #005a87;
}

.bc-search-button:active {
	background: #004a6f;
}

.bc-search-help {
	font-size: 13px;
	color: #666;
	margin: 0 0 10px 0;
}

.bc-search-message {
	padding: 10px;
	margin-bottom: 15px;
	border-radius: 4px;
	display: none;
}

.bc-search-message.error {
	background: #fff8e5;
	border-left: 4px solid #ffb900;
	color: #8a6d3b;
	display: block;
}

.bc-search-message.success {
	background: #e7f7e7;
	border-left: 4px solid #46b450;
	color: #2e7d32;
	display: block;
}

.bc-search-results {
	margin-top: 20px;
}

.bc-search-results .bc-widget-accordion {
	margin-bottom: 15px;
}

/* Loading state */
.bc-search-widget.loading .bc-search-button {
	opacity: 0.6;
	cursor: not-allowed;
}

.bc-search-widget.loading .bc-search-input {
	opacity: 0.6;
}


/* reCAPTCHA badge positioning - menos intrusivo */
body:not(.bc-recaptcha-hidden) .grecaptcha-badge {
	position: fixed !important;
	bottom: 14px !important;
	right: 14px !important;
	z-index: 9999 !important;
	opacity: 0.8;
	transition: opacity 0.3s ease;
}

body:not(.bc-recaptcha-hidden) .grecaptcha-badge:hover {
	opacity: 1;
}

/* Badge oculto cuando se selecciona esa opción */
body.bc-recaptcha-hidden .grecaptcha-badge {
	visibility: hidden !important;
}

/* Términos de reCAPTCHA */
.bc-recaptcha-terms {
	font-size: 11px;
	color: #666;
	margin: 10px 0;
	line-height: 1.4;
}

.bc-recaptcha-terms a {
	color: #0073aa;
	text-decoration: none;
}

.bc-recaptcha-terms a:hover {
	text-decoration: underline;
}

/* ========================================
   GRID CALENDAR STYLES
   ======================================== */

/* Contenedor principal del calendario grid */
.bc-grid-calendar {
	max-width: 400px;
	margin: 0 auto 20px;
	border: 1px solid #ddd;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Header con navegación */
.bc-grid-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 15px 20px;
	background: #0073aa;
	color: #fff;
}

.bc-grid-month-title {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	text-align: center;
	flex: 1;
}

/* Botones de navegación */
.bc-grid-nav {
	background: none;
	border: none;
	color: #fff;
	cursor: pointer;
	padding: 8px 12px;
	border-radius: 4px;
	transition: background 0.3s ease;
	font-size: 18px;
	line-height: 1;
}

.bc-grid-nav:hover {
	background: rgba(255, 255, 255, 0.2);
}

.bc-grid-nav:active {
	background: rgba(255, 255, 255, 0.3);
}

.bc-grid-nav-icon {
	display: block;
	font-weight: bold;
}

/* Días de la semana */
.bc-grid-weekdays {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	background: #f7f7f7;
	border-bottom: 1px solid #ddd;
}

.bc-grid-weekday {
	padding: 10px 5px;
	text-align: center;
	font-size: 12px;
	font-weight: 600;
	color: #666;
	text-transform: uppercase;
}

/* Grid de días */
.bc-grid-days {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 1px;
	background: #ddd;
}

/* Día individual */
.bc-grid-day {
	position: relative;
	aspect-ratio: 1;
	background: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.3s ease;
	min-height: 40px;
}

.bc-grid-day:hover {
	background: #f0f8ff;
}

.bc-grid-day-empty {
	cursor: default;
	background: #f9f9f9;
}

.bc-grid-day-empty:hover {
	background: #f9f9f9;
}

/* Número del día */
.bc-grid-day-number {
	font-size: 14px;
	font-weight: 500;
	color: #333;
	z-index: 2;
	position: relative;
}

/* Día actual */
.bc-grid-day-today {
	background: #e3f2fd;
	font-weight: 700;
}

.bc-grid-day-today .bc-grid-day-number {
	color: #0073aa;
}

.bc-grid-day-today:hover {
	background: #bbdefb;
}

/* Días con galería */
.bc-grid-day-has-gallery {
	background: #fff3e0;
	border: 2px solid #ff9800;
}

.bc-grid-day-has-gallery:hover {
	background: #ffe0b2;
	transform: scale(1.05);
}

.bc-grid-day-has-gallery .bc-grid-day-number {
	color: #e65100;
	font-weight: 600;
}

/* Indicador de galería */
.bc-grid-day-indicator {
	position: absolute;
	top: 3px;
	right: 3px;
	width: 6px;
	height: 6px;
	background: #ff9800;
	border-radius: 50%;
	z-index: 3;
}

/* Día seleccionado */
.bc-grid-day.selected {
	background: #0073aa;
	color: #fff;
}

.bc-grid-day.selected .bc-grid-day-number {
	color: #fff;
}

.bc-grid-day.selected .bc-grid-day-indicator {
	background: #fff;
}

/* Acciones del calendario */
.bc-grid-actions {
	padding: 15px 20px;
	background: #f7f7f7;
	border-top: 1px solid #ddd;
	text-align: center;
}

.bc-grid-show-month {
	background: #0073aa;
	color: #fff;
	border: none;
	padding: 10px 20px;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	transition: background 0.3s ease;
}

.bc-grid-show-month:hover {
	background: #005a87;
}

.bc-grid-show-month:active {
	background: #004a6f;
}

/* Contenedor de contenido dinámico */
.bc-grid-content {
	margin-top: 20px;
}

.bc-grid-content.loading {
	opacity: 0.6;
	pointer-events: none;
}

/* Estados de carga */
.bc-grid-calendar.loading {
	opacity: 0.6;
}

.bc-grid-calendar.loading .bc-grid-nav,
.bc-grid-calendar.loading .bc-grid-day,
.bc-grid-calendar.loading .bc-grid-show-month {
	pointer-events: none;
}

/* Responsive para el grid */
@media (max-width: 480px) {
	.bc-grid-calendar {
		max-width: 100%;
		margin: 0 0 20px;
	}
	
	.bc-grid-header {
		padding: 12px 15px;
	}
	
	.bc-grid-month-title {
		font-size: 16px;
	}
	
	.bc-grid-nav {
		padding: 6px 10px;
		font-size: 16px;
	}
	
	.bc-grid-weekday {
		padding: 8px 3px;
		font-size: 11px;
	}
	
	.bc-grid-day {
		min-height: 35px;
	}
	
	.bc-grid-day-number {
		font-size: 13px;
	}
	
	.bc-grid-actions {
		padding: 12px 15px;
	}
	
	.bc-grid-show-month {
		padding: 8px 16px;
		font-size: 13px;
	}
}

/* Modo oscuro para el grid */
@media (prefers-color-scheme: dark) {
	.bc-grid-calendar {
		background: #2c2c2c;
		border-color: #444;
	}
	
	.bc-grid-weekdays {
		background: #3c3c3c;
		border-color: #555;
	}
	
	.bc-grid-weekday {
		color: #ccc;
	}
	
	.bc-grid-days {
		background: #555;
	}
	
	.bc-grid-day {
		background: #2c2c2c;
		color: #fff;
	}
	
	.bc-grid-day:hover {
		background: #3c3c3c;
	}
	
	.bc-grid-day-empty {
		background: #1c1c1c;
	}
	
	.bc-grid-day-empty:hover {
		background: #1c1c1c;
	}
	
	.bc-grid-day-number {
		color: #fff;
	}
	
	.bc-grid-day-today {
		background: #1e3a5f;
	}
	
	.bc-grid-day-today .bc-grid-day-number {
		color: #4a9eff;
	}
	
	.bc-grid-day-has-gallery {
		background: #3d2914;
		border-color: #ff9800;
	}
	
	.bc-grid-day-has-gallery:hover {
		background: #4d3318;
	}
	
	.bc-grid-actions {
		background: #3c3c3c;
		border-color: #555;
	}
}