/* Royal Kids - Calendario de Entradas */
/* Responsive: Mobile First */

/* ===========================================
   VARIABLES Y BASE
   =========================================== */

   .rk-entries-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 15px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* ===========================================
   HEADER
   =========================================== */

.rk-entries-header {
    text-align: center;
    margin-bottom: 20px;
}

.rk-entries-header h2 {
    color: #E31E24;
    font-size: 22px;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.rk-entries-header p {
    color: #666;
    margin: 0;
    font-size: 14px;
}

/* ===========================================
   LEYENDA
   =========================================== */

.rk-entries-legend {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
    background: #f9f9f9;
    padding: 12px;
    border-radius: 10px;
}

.rk-legend-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rk-legend-section strong {
    color: #333;
    font-size: 13px;
}

.rk-legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.rk-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #555;
}

.rk-legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    flex-shrink: 0;
}

.rk-legend-weekday {
    background: linear-gradient(135deg, #4CAF50, #45a049);
}

.rk-legend-weekend {
    background: linear-gradient(135deg, #FF9800, #f57c00);
}

.rk-legend-baby {
    border-top: 1px dashed #ddd;
    padding-top: 12px;
}

.rk-legend-baby-price {
    background: linear-gradient(135deg, #9C27B0, #7B1FA2);
}

.rk-legend-closed {
    background: linear-gradient(135deg, #9e9e9e, #757575);
}

/* ===========================================
   CALENDARIO
   =========================================== */

.rk-calendar {
    background: #fff;
    border: 2px solid #E31E24;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: relative;
}

.rk-calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f9f9f9;
    border-bottom: 1px solid #eee;
    gap: 10px;
}

.rk-nav-btn {
    background: linear-gradient(135deg, #E31E24, #c41920);
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
    white-space: nowrap;
    min-width: 70px;
}

.rk-nav-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(227,30,36,0.3);
}

.rk-nav-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.rk-calendar-title {
    margin: 0;
	padding: 10px 0;
    font-size: 18px;
    color: #333;
    text-align: center;
    flex: 1;
    font-weight: 600;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Días de la semana */
.rk-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: linear-gradient(135deg, #E31E24, #c41920);
    color: #fff;
    font-weight: bold;
    font-size: 11px;
    text-transform: uppercase;
}

.rk-calendar-weekdays > div {
    padding: 12px 2px;
    text-align: center;
}

/* Grid de días */
.rk-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    padding: 8px;
    background: #f0f0f0;
}

.rk-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    font-weight: bold;
    padding: 2px;
}

.rk-day:hover:not(.rk-day-past):not(.rk-day-empty) {
    transform: scale(1.05);
    z-index: 2;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}

.rk-day-empty {
    background: transparent;
    cursor: default;
}

.rk-day-weekday {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    color: #2e7d32;
}

.rk-day-weekend {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    color: #e65100;
}

.rk-day-past {
    background: #f5f5f5;
    color: #bbb;
    cursor: not-allowed;
}

.rk-day-closed {
    background: linear-gradient(135deg, #9e9e9e, #757575);
    color: #fff;
    cursor: not-allowed;
    opacity: 0.7;
}

.rk-day-closed .rk-day-price {
    font-size: 7px;
    text-transform: uppercase;
}

.rk-day-today {
    border: 2px solid #E31E24;
}

.rk-day-selected {
    background: linear-gradient(135deg, #E31E24, #c41920) !important;
    color: #fff !important;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(227,30,36,0.4);
}

.rk-day-holiday::after {
    content: '🎉';
    position: absolute;
    top: 1px;
    right: 1px;
    font-size: 8px;
}

.rk-day-number {
    font-size: 18px;
    line-height: 1;
}

.rk-day-price {
    font-size: 11px;
    opacity: 0.9;
    line-height: 1;
    margin-top: 3px;
    font-weight: 600;
}

/* ===========================================
   PANEL DE SELECCIÓN
   =========================================== */

.rk-selection-panel {
    background: linear-gradient(135deg, #fff5f5, #ffebee);
    border: 2px solid #E31E24;
    border-radius: 12px;
    padding: 15px;
    margin-top: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.rk-selection-panel h4 {
    margin: 0 0 12px 0;
    color: #E31E24;
    font-size: 18px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.rk-selected-date {
    font-size: 16px;
    color: #333;
    margin-bottom: 15px;
    font-weight: 600;
}

.rk-selected-price {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

/* Tipos de entrada */
.rk-entry-type-section {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    border: 2px solid #f0f0f0;
}

.rk-entry-type-section:last-of-type {
    margin-bottom: 15px;
}

.rk-entry-type-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
}

.rk-entry-type-icon {
    font-size: 24px;
}

.rk-entry-type-label {
    flex: 1;
    font-weight: 600;
    color: #333;
    font-size: 16px;
    min-width: 120px;
}

.rk-entry-type-label small {
    font-weight: normal;
    color: #666;
    font-size: 12px;
    display: block;
}

.rk-entry-type-price {
    font-weight: bold;
    color: #E31E24;
    font-size: 18px;
}

.rk-entry-baby-section {
    background: #f3e5f5;
    border: 1px solid #ce93d8;
}

.rk-entry-baby-section .rk-entry-type-price {
    color: #7B1FA2;
}

/* Selector de cantidad */
.rk-quantity-selector {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding-top: 10px;
    border-top: 1px dashed #eee;
    margin-top: 10px;
}

.rk-quantity-selector label {
    display: none;
}

.rk-quantity-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rk-qty-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: linear-gradient(135deg, #E31E24, #c41920);
    color: #fff;
    font-size: 20px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rk-qty-btn:hover {
    transform: scale(1.1);
}

.rk-qty-btn:active {
    transform: scale(0.95);
}

.rk-quantity-input {
    width: 60px;
    height: 44px;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    border: 2px solid #E31E24;
    border-radius: 8px;
}

.rk-entry-subtotal {
    font-weight: bold;
    color: #2e7d32;
    font-size: 20px;
    min-width: 80px;
    text-align: right;
}

.rk-entry-baby-section .rk-entry-subtotal {
    color: #7B1FA2;
}

.rk-entry-baby-section .rk-qty-btn {
    background: linear-gradient(135deg, #9C27B0, #7B1FA2);
}

.rk-entry-baby-section .rk-quantity-input {
    border-color: #9C27B0;
}

/* Total */
.rk-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    border-radius: 10px;
    margin-bottom: 12px;
}

.rk-total-label {
    font-size: 18px;
    font-weight: 600;
    color: #2e7d32;
}

.rk-total-amount {
    font-size: 24px;
    font-weight: bold;
    color: #2e7d32;
}

/* Botón añadir */
.rk-add-to-cart {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #E31E24, #c41920);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(227, 30, 36, 0.3);
}

.rk-add-to-cart:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(227,30,36,0.4);
}

.rk-add-to-cart:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* ===========================================
   LOADING Y MENSAJES
   =========================================== */

.rk-calendar-loading {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.9);
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.rk-calendar-loading.active {
    display: flex;
}

.rk-spinner {
    /* width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #E31E24;
    border-radius: 50%;
    animation: spin 0.8s linear infinite; */
	width: 80px;
    height: 80px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #E31E24;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    top: 43%;
    left: 45%;
    position: relative;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.rk-message {
    padding: 12px 15px;
    border-radius: 10px;
    margin-top: 12px;
    text-align: center;
    animation: fadeIn 0.3s;
    font-size: 14px;
}

.rk-message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.rk-message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===========================================
   INFO BOX
   =========================================== */

.rk-info-box {
    background: #f9f9f9;
    border-left: 4px solid #E31E24;
    padding: 25px 20px;
    border-radius: 0 10px 10px 0;
    margin-top: 20px;
}

.rk-info-box p {
    margin: 0 0 8px 0;
    font-size: 14px;
}

.rk-info-box ul {
    margin: 0;
    padding-left: 0;
}

.rk-info-box li {
    margin: 6px 0;
    color: #666;
    font-size: 14px;
}
.rk-info-box h4 {
    margin: 0 0 12px 0;
    color: #333;
    font-size: 18px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}



/* ===========================================
   CONFIGURACIÓN NO COMPLETADA
   =========================================== */

.rk-config-warning {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 10px;
    padding: 20px 15px;
    text-align: center;
    color: #856404;
}

.rk-config-warning strong {
    color: #664d03;
}

/* ===========================================
   AVISOS DE ESTADO DEL LOCAL
   =========================================== */

.rk-venue-status-notice {
    background: #fff;
    border-radius: 12px;
    padding: 25px 20px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.rk-venue-status-notice .rk-status-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
}

.rk-venue-status-notice .rk-status-icon {
    font-size: 28px;
}

.rk-venue-status-notice .rk-status-header strong {
    font-size: 18px;
    color: #333;
}

.rk-venue-status-notice .rk-status-message {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

/* Estado: Cerrado temporalmente */
.rk-venue-status-notice.rk-status-closed_temp {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 2px solid #f59e0b;
}

.rk-venue-status-notice.rk-status-closed_temp .rk-status-header strong {
    color: #b45309;
}

/* Estado: Cerrado */
.rk-venue-status-notice.rk-status-closed {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 2px solid #ef4444;
}

.rk-venue-status-notice.rk-status-closed .rk-status-header strong {
    color: #dc2626;
}

/* ===========================================
   RESPONSIVE - TABLET (>= 576px)
   =========================================== */

@media (min-width: 576px) {
    .rk-entries-container {
        padding: 20px;
    }
    
    .rk-entries-header h2 {
        font-size: 26px;
    }
    
    .rk-entries-header p {
        font-size: 15px;
    }
    
    .rk-legend-section {
        flex-direction: row;
        align-items: center;
        gap: 15px;
    }
    
    .rk-legend-items {
        gap: 20px;
    }
    
    .rk-legend-item {
        font-size: 13px;
    }
    
    .rk-legend-color {
        width: 18px;
        height: 18px;
    }
    
    .rk-nav-btn {
        padding: 10px 18px;
        font-size: 14px;
        min-width: 100px;
    }
    
    .rk-calendar-title {
        font-size: 22px;
    }
    
    .rk-calendar-weekdays {
        font-size: 13px;
    }
    
    .rk-calendar-weekdays > div {
        padding: 14px 5px;
    }
    
    .rk-calendar-grid {
        padding: 10px;
        gap: 4px;
    }
    
    .rk-day {
        border-radius: 8px;
    }
    
    .rk-day-number {
        font-size: 22px;
    }
    
    .rk-day-price {
        font-size: 13px;
        margin-top: 4px;
    }
    
    .rk-day-holiday::after {
        font-size: 12px;
        top: 3px;
        right: 3px;
    }
    
    .rk-selection-panel {
        padding: 20px;
    }
    
    .rk-selection-panel h4 {
        font-size: 18px;
    }
    
    .rk-entry-type-section {
        padding: 15px;
    }
    
    .rk-entry-type-header {
        flex-wrap: nowrap;
    }
    
    .rk-entry-type-label small {
        display: inline;
    }
    
    .rk-qty-btn {
        width: 48px;
        height: 48px;
        font-size: 22px;
    }
    
    .rk-quantity-input {
        width: 70px;
        height: 48px;
        font-size: 20px;
    }
    
    .rk-entry-subtotal {
        font-size: 20px;
    }
    
    .rk-total {
        padding: 15px;
    }
    
    .rk-total-label {
        font-size: 18px;
    }
    
    .rk-total-amount {
        font-size: 26px;
    }
    
    .rk-add-to-cart {
        padding: 16px;
        font-size: 17px;
    }
}

/* ===========================================
   RESPONSIVE - TABLET LANDSCAPE (>= 768px)
   =========================================== */

@media (min-width: 768px) {
    .rk-entries-header h2 {
        font-size: 34px;
    }
    
    .rk-calendar-nav {
        padding: 15px 20px;
    }
    
    .rk-nav-btn {
        padding: 12px 22px;
        font-size: 15px;
        min-width: 120px;
    }
    
    .rk-calendar-weekdays {
        font-size: 14px;
    }
    
    .rk-calendar-weekdays > div {
        padding: 15px 5px;
    }
    
    .rk-day-number {
        font-size: 26px;
    }
    
    .rk-day-price {
        font-size: 14px;
        margin-top: 5px;
    }
    
    .rk-add-to-cart {
        padding: 18px;
        font-size: 18px;
    }
}

/* ===========================================
   RESPONSIVE - DESKTOP (>= 992px)
   =========================================== */

@media (min-width: 992px) {
    .rk-entries-container {
        max-width: 650px;
    }
    
    .rk-day:hover:not(.rk-day-past):not(.rk-day-empty) {
        transform: scale(1.08);
    }
}

/* ===========================================
   RESPONSIVE - MOBILE PEQUEÑO (< 375px)
   =========================================== */

@media (max-width: 374px) {
    .rk-entries-container {
        padding: 10px;
    }
    
    .rk-entries-header h2 {
        font-size: 20px;
    }
    
    .rk-entries-legend {
        padding: 10px;
    }
    
    .rk-legend-item {
        font-size: 11px;
    }
    
    .rk-legend-color {
        width: 14px;
        height: 14px;
    }
    
    .rk-nav-btn {
        padding: 8px 12px;
        font-size: 11px;
        min-width: 70px;
    }
    
    .rk-calendar-title {
        font-size: 15px;
    }
    
    .rk-calendar-weekdays {
        font-size: 9px;
    }
    
    .rk-calendar-weekdays > div {
        padding: 10px 1px;
    }
    
    .rk-day-number {
        font-size: 14px;
    }
    
    .rk-day-price {
        font-size: 9px;
        margin-top: 2px;
    }
    
    .rk-day-holiday::after {
        display: none;
    }
    
    .rk-selection-panel {
        padding: 12px;
    }
    
    .rk-entry-type-section {
        padding: 10px;
    }
    
    .rk-entry-type-icon {
        font-size: 18px;
    }
    
    .rk-entry-type-label {
        font-size: 13px;
    }
    
    .rk-entry-type-price {
        font-size: 14px;
    }
    
    .rk-qty-btn {
        width: 38px;
        height: 38px;
        font-size: 18px;
    }
    
    .rk-quantity-input {
        width: 50px;
        height: 38px;
        font-size: 16px;
    }
    
    .rk-entry-subtotal {
        font-size: 14px;
        min-width: 60px;
    }
    
    .rk-total-label {
        font-size: 14px;
    }
    
    .rk-total-amount {
        font-size: 18px;
    }
    
    .rk-add-to-cart {
        padding: 12px;
        font-size: 15px;
    }
}

/* ===========================================
   RESPONSIVE - MEJORAS MÓVIL (320px - 480px)
   =========================================== */

@media (max-width: 480px) and (min-width: 375px) {
    .rk-entries-container {
        padding: 12px;
    }
    
    .rk-entries-header h2 {
        font-size: 21px;
    }
    
    .rk-calendar-grid {
        gap: 3px;
        padding: 6px;
    }
    
    .rk-day {
        border-radius: 6px;
        min-height: 50px;
    }
    
    .rk-day-number {
        font-size: 16px;
    }
    
    .rk-day-price {
        font-size: 10px;
    }
    
    /* Panel de selección */
    .rk-selection-panel {
        padding: 14px;
    }
    
    .rk-selection-panel h4 {
        font-size: 16px;
    }
    
    .rk-selected-date {
        font-size: 15px;
    }
    
    .rk-entry-type-section {
        padding: 12px;
    }
    
    .rk-entry-type-header {
        margin-bottom: 0;
    }
    
    .rk-entry-type-label {
        font-size: 15px;
    }
    
    .rk-entry-type-price {
        font-size: 16px;
    }
    
    /* Selector de cantidad en fila con subtotal */
    .rk-quantity-selector {
        justify-content: space-between;
        gap: 10px;
    }
    
    .rk-qty-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .rk-quantity-input {
        width: 55px;
        height: 40px;
        font-size: 17px;
    }
    
    .rk-entry-subtotal {
        font-size: 18px;
        min-width: 70px;
    }
    
    .rk-total-label {
        font-size: 16px;
    }
    
    .rk-total-amount {
        font-size: 22px;
    }
}

/* ===========================================
   MEJORAS GLOBALES MÓVIL
   =========================================== */

@media (max-width: 575px) {
    /* Mejor espaciado táctil */
    .rk-day {
        min-height: 42px;
    }
    
    /* Botones más grandes para tocar */
    .rk-nav-btn {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .rk-qty-btn {
        min-width: 44px;
        min-height: 44px;
    }
    
    .rk-add-to-cart {
        min-height: 50px;
        font-size: 16px;
    }
    
    /* Leyenda más compacta */
    .rk-entries-legend {
        padding: 10px;
        gap: 8px;
    }
    
    .rk-legend-section {
        flex-direction: column;
        gap: 6px;
    }
    
    .rk-legend-items {
        gap: 10px;
    }
    
    /* Navegación del calendario */
    .rk-calendar-nav {
        padding: 10px;
        gap: 8px;
    }
    
    /* Total fijo abajo en móvil */
    .rk-total {
        position: sticky;
        bottom: 0;
        margin: 0 -12px -12px;
        border-radius: 0;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    }
}

/* ===========================================
   LANDSCAPE MÓVIL
   =========================================== */

@media (max-height: 500px) and (orientation: landscape) {
    .rk-entries-container {
        max-width: 100%;
    }
    
    .rk-calendar-grid {
        gap: 2px;
    }
    
    .rk-day {
        aspect-ratio: auto;
        min-height: 35px;
        padding: 4px;
    }
    
    .rk-day-price {
        display: none;
    }
}

/* ===========================================
   ANIMACIÓN DE ACTUALIZACIÓN DEL CARRITO
   =========================================== */

@keyframes rkCartPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
        background-color: #E31E24;
        color: white;
    }
    100% {
        transform: scale(1);
    }
}

.rk-cart-updated {
    animation: rkCartPulse 0.5s ease-in-out;
}

/* ===========================================
   MEJORAS DE ACCESIBILIDAD
   =========================================== */

@media (prefers-reduced-motion: reduce) {
    .rk-day,
    .rk-nav-btn,
    .rk-qty-btn,
    .rk-add-to-cart {
        transition: none;
    }
    
    .rk-day:hover:not(.rk-day-past):not(.rk-day-empty) {
        transform: none;
    }
    
    .rk-cart-updated {
        animation: none;
    }
}

/* Focus visible para teclado */
.rk-day:focus-visible,
.rk-nav-btn:focus-visible,
.rk-qty-btn:focus-visible,
.rk-add-to-cart:focus-visible {
    outline: 3px solid #E31E24;
    outline-offset: 2px;
}

/* ===========================================
   TEMPLATE FULL-WIDTH OVERRIDES
   =========================================== */

.rk-fullwidth-page .rk-entries-container {
    max-width: 650px;
}

@media (min-width: 768px) {
    .rk-fullwidth-page .rk-entries-container {
        max-width: 700px;
    }
}

@media (min-width: 992px) {
    .rk-fullwidth-page .rk-entries-container {
        max-width: 750px;
    }
}
