/* Smile QUIZ Toruń - kalendarz rezerwacji */

#sqc-calendar-container {
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    font-family: inherit;
    color: #2d2a45;
}

#sqc-calendar-container * {
    box-sizing: border-box;
}

#sqc-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: linear-gradient(135deg, #6d28d9 0%, #7c3aed 50%, #8b5cf6 100%);
    color: #ffffff;
    padding: 16px;
    border-radius: 12px 12px 0 0;
}

#sqc-header-title {
    text-align: center;
    flex: 1;
}

#sqc-current-month {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
}

#sqc-header-subtitle {
    display: block;
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.85;
    margin-top: 2px;
}

#sqc-prev-month,
#sqc-next-month {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    font-size: 18px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s ease, transform 0.2s ease;
}

#sqc-prev-month:hover,
#sqc-next-month:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-1px);
}

#sqc-calendar-grid {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
    gap: 4px;
    background: #f8f7fc;
    padding: 8px;
    border: 1px solid #ece9f6;
    border-top: none;
    border-radius: 0 0 12px 12px;
}

.sqc-day-header {
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: #6d28d9;
    padding: 8px 0;
    text-transform: uppercase;
}

#sqc-calendar-days {
    display: contents;
}

.sqc-day {
    position: relative;
    min-height: 56px;
    background: #ffffff;
    border: 1px solid #ece9f6;
    border-radius: 8px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.sqc-day-empty {
    background: transparent;
    border: none;
}

.sqc-day-number {
    font-size: 14px;
    font-weight: 600;
}

.sqc-day-badge {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #b91c1c;
    align-self: flex-start;
}

.sqc-day-badge.sqc-badge-free {
    color: #15803d;
}

.sqc-day-available {
    cursor: pointer;
}

.sqc-day-available:hover {
    transform: translateY(-2px);
    border-color: #8b5cf6;
    box-shadow: 0 6px 16px rgba(109, 40, 217, 0.18);
}

.sqc-day-today {
    border-color: #f59e0b;
    box-shadow: inset 0 0 0 1px #f59e0b;
}

.sqc-day-disabled {
    background: #f3f2f7;
    color: #b8b5c7;
    opacity: 0.6;
}

.sqc-day-disabled .sqc-day-number {
    color: #b8b5c7;
}

.sqc-day-full {
    background: #fdf2f2;
    cursor: not-allowed;
}

.sqc-day-blocked {
    background: #f3f2f7;
    cursor: not-allowed;
    opacity: 0.75;
}

.sqc-day-blocked .sqc-day-number {
    color: #9ca3af;
    text-decoration: line-through;
}

#sqc-calendar-hint {
    text-align: center;
    font-size: 13px;
    color: #6b7280;
    margin-top: 12px;
}

/* ---------------- Modal ---------------- */

.sqc-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(20, 16, 40, 0.6);
    backdrop-filter: blur(3px);
    padding: 16px;
    overflow-y: auto;
}

.sqc-modal.sqc-modal-open {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    animation: sqcFadeIn 0.2s ease;
}

@keyframes sqcFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.sqc-modal-content {
    position: relative;
    background: #ffffff;
    width: 100%;
    max-width: 460px;
    margin: 32px auto;
    border-radius: 16px;
    padding: 28px 24px 24px;
    box-shadow: 0 24px 60px rgba(20, 16, 40, 0.35);
    animation: sqcSlideUp 0.25s ease;
}

@keyframes sqcSlideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.sqc-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
}

.sqc-close:hover {
    color: #2d2a45;
}

#sqc-modal-title {
    margin: 0 0 4px;
    font-size: 22px;
    color: #2d2a45;
}

.sqc-modal-date {
    margin: 0 0 20px;
    color: #6d28d9;
    font-weight: 600;
    text-transform: capitalize;
}

.sqc-form-group {
    margin-bottom: 16px;
}

.sqc-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #2d2a45;
}

.sqc-form-group input,
.sqc-form-group select {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #d6d3e3;
    border-radius: 8px;
    font-size: 16px;
    color: #2d2a45;
    background: #ffffff;
}

.sqc-form-group input:focus,
.sqc-form-group select:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18);
}

.sqc-hint {
    display: block;
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}

.sqc-price-info {
    background: #f5f3ff;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.sqc-price-info h4 {
    margin: 0 0 8px;
    font-size: 14px;
    color: #6d28d9;
}

.sqc-price-row {
    font-size: 14px;
    margin-bottom: 4px;
}

.sqc-price-total {
    font-size: 18px;
    font-weight: 700;
    color: #2d2a45;
    margin-top: 6px;
}

.sqc-form-message {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
}

.sqc-msg-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.sqc-msg-success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.sqc-form-actions {
    display: flex;
    gap: 10px;
}

.sqc-btn-primary,
.sqc-btn-secondary {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.sqc-btn-primary {
    background: linear-gradient(135deg, #6d28d9, #8b5cf6);
    color: #ffffff;
}

.sqc-btn-primary:hover {
    transform: translateY(-1px);
}

.sqc-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.sqc-btn-secondary {
    background: #f3f2f7;
    color: #2d2a45;
}

.sqc-btn-secondary:hover {
    background: #e9e7f2;
}

body.sqc-modal-active {
    overflow: hidden;
}

/* ---------------- Responsywność ---------------- */

@media (max-width: 600px) {
    #sqc-current-month {
        font-size: 17px;
    }

    #sqc-calendar-grid {
        gap: 3px;
        padding: 6px;
    }

    .sqc-day {
        min-height: 46px;
        padding: 4px;
        border-radius: 6px;
    }

    .sqc-day-number {
        font-size: 13px;
    }

    .sqc-day-badge {
        font-size: 8px;
    }

    .sqc-day-header {
        font-size: 10px;
        padding: 6px 0;
    }

    #sqc-prev-month,
    #sqc-next-month {
        width: 36px;
        height: 36px;
    }

    .sqc-modal-content {
        padding: 24px 16px 16px;
        margin: 16px auto;
    }
}

@media (max-width: 380px) {
    .sqc-day {
        min-height: 40px;
    }

    .sqc-day-badge {
        display: none;
    }
}
