/**
 * CSS per il frontend del plugin Catacombe di Priscilla Booking
 */

/* Import Plus Jakarta Sans font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;0,800;1,200;1,300;1,400;1,500;1,600;1,700;1,800&display=swap');

/* Global font family */
* {
    font-family: "Plus Jakarta Sans", sans-serif;
}

.cpb-booking-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: "Plus Jakarta Sans", sans-serif;
    color: #1A1A1A;
}

.cpb-booking-header {
    text-align: center;
    margin-bottom: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #D9C46E 0%, #EAE0B9 100%);
    border-radius: 10px;
    color: #000;
}

.cpb-booking-header h2 {
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.2em;
}

.cpb-booking-header p {
    font-size: 1.1rem;
    margin: 0;
    opacity: 0.9;
}

/* Progress Bar */
.cpb-booking-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    position: relative;
}

.cpb-booking-progress::before {
    content: '';
    position: absolute;
    top: 25px;
    left: 0;
    right: 0;
    height: 2px;
    background: #E5E7F1;
    z-index: 1;
}

.cpb-progress-step {
    position: relative;
    z-index: 2;
    text-align: center;
    flex: 1;
}

.cpb-progress-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #E5E7F1;
    color: #1A1A1A;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
    margin: 0 auto 10px;
    transition: all 0.3s ease;
}

.cpb-progress-step.active .cpb-progress-number {
    background: #D9C46E;
    color: #000;
}

.cpb-progress-step.completed .cpb-progress-number {
    background: #D9C46E;
    color: #000;
}

.cpb-progress-label {
    font-size: 14px;
    font-weight: 500;
    color: #1A1A1A;
}

.cpb-progress-step.active .cpb-progress-label {
    color: #D9C46E;
    font-weight: 600;
}

/* Steps */
.cpb-step {
    display: none;
    animation: fadeIn 0.5s ease;
}

.cpb-step.active {
    display: block;
}

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

.cpb-step-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.cpb-step-content h3 {
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0 0 15px 0;
    color: #1B1D2C;
}

.cpb-step-content p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 25px;
    color: #1A1A1A;
}

/* Language Selection */
.cpb-languages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.cpb-language-option {
    display: flex;
    align-items: center;
    padding: 20px;
    border: 2px solid #E5E7F1;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.cpb-language-option:hover {
    border-color: #D9C46E;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(217, 196, 110, 0.2);
}

.cpb-language-option.selected {
    border-color: #D9C46E;
    background: linear-gradient(135deg, #D9C46E 0%, #EAE0B9 100%);
    color: #000;
}

.cpb-language-flag {
    font-size: 2rem;
    margin-right: 15px;
}

.cpb-language-name {
    font-size: 1.1rem;
    font-weight: 500;
}

/* Group Types */
.cpb-group-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.cpb-group-option {
    display: flex;
    align-items: center;
    padding: 25px;
    border: 2px solid #E5E7F1;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.cpb-group-option:hover {
    border-color: #D9C46E;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(217, 196, 110, 0.2);
}

.cpb-group-option.selected {
    border-color: #D9C46E;
    background: linear-gradient(135deg, #D9C46E 0%, #EAE0B9 100%);
    color: #000;
}

.cpb-group-icon {
    font-size: 2.5rem;
    margin-right: 20px;
}

.cpb-group-info h4 {
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.cpb-group-info p {
    margin: 5px 0;
    font-size: 0.95rem;
}

/* Date and Time Selection */
.cpb-date-time-selection {
    margin-top: 20px;
}

.cpb-date-picker {
    margin-bottom: 25px;
}

.cpb-date-picker label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #1B1D2C;
}

/* Calendar Styles */
.cpb-calendar-container {
    background: white;
    border: 2px solid #E5E7F1;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.cpb-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: linear-gradient(135deg, #1B1D2C 0%, #2C3E50 100%);
    color: white;
}

.cpb-calendar-nav {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.cpb-calendar-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.cpb-calendar-title {
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
}

.cpb-calendar-month {
    margin-right: 5px;
}

.cpb-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #f8f9fa;
    border-bottom: 1px solid #E5E7F1;
}

.cpb-weekday {
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: #1B1D2C;
    border-right: 1px solid #E5E7F1;
}

.cpb-weekday:last-child {
    border-right: none;
}

.cpb-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: white;
}

.cpb-calendar-day {
    padding: 12px 8px;
    text-align: center;
    cursor: pointer;
    border-right: 1px solid #E5E7F1;
    border-bottom: 1px solid #E5E7F1;
    transition: all 0.3s ease;
    position: relative;
    min-height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cpb-calendar-day:nth-child(7n) {
    border-right: none;
}

.cpb-calendar-day:hover:not(.disabled):not(.other-month) {
    background: #EAE0B9;
    color: #1B1D2C;
}

.cpb-calendar-day.selected {
    background: #D9C46E;
    color: #000;
    font-weight: 600;
}

.cpb-calendar-day.disabled {
    color: #ccc;
    cursor: not-allowed;
    background: #f9f9f9;
}

.cpb-calendar-day.disabled-no-slots {
    color: #999;
    cursor: not-allowed;
    background: #f5f5f5;
    position: relative;
}

.cpb-calendar-day.disabled-no-slots::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 2px;
    background: #ccc;
    border-radius: 1px;
}

.cpb-calendar-day.other-month {
    color: #ccc;
    background: #f9f9f9;
}

.cpb-calendar-day.today {
    background: #1B1D2C;
    color: white;
    font-weight: 600;
}

.cpb-calendar-day.today:hover:not(.disabled) {
    background: #2C3E50;
}

.cpb-calendar-day.available {
    position: relative;
}

.cpb-calendar-day.available::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: #D9C46E;
    border-radius: 50%;
}

.cpb-calendar-day.selected::after {
    background: #000;
}

.cpb-time-slots label {
    display: block;
    font-weight: 600;
    margin-bottom: 15px;
    color: #1B1D2C;
}

.cpb-time-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.cpb-time-slot {
    padding: 12px;
    text-align: center;
    border: 2px solid #E5E7F1;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    font-weight: 500;
}

.cpb-time-slot:hover {
    border-color: #D9C46E;
    background: #EAE0B9;
}

.cpb-time-slot.selected {
    border-color: #D9C46E;
    background: #D9C46E;
    color: #000;
}

.cpb-time-slot.disabled {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
    border-color: #ddd;
}

.cpb-time-slot .cpb-time-text {
    display: block;
    font-weight: 500;
    margin-bottom: 4px;
}

.cpb-time-slot .cpb-capacity-text {
    display: block;
    font-size: 0.85em;
    font-weight: 400;
    opacity: 0.8;
}

.cpb-time-slot.disabled .cpb-capacity-text {
    color: #999;
    font-weight: 600;
}

.cpb-loading-slots,
.cpb-no-slots {
    text-align: center;
    padding: 30px;
    color: #666;
}

/* Personal Data Form */
.cpb-personal-data {
    margin-top: 20px;
}

.cpb-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.cpb-form-group {
    margin-bottom: 20px;
}

.cpb-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1B1D2C;
}

.cpb-form-group input,
.cpb-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #E5E7F1;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.cpb-form-group input:focus,
.cpb-form-group textarea:focus {
    outline: none;
    border-color: #D9C46E;
}

.cpb-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.cpb-help-text {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-top: 5px;
}

.cpb-capacity-info {
    margin-top: 8px;
    font-size: 0.9rem;
}

.cpb-capacity-remaining {
    color: #0066cc;
    font-weight: 500;
}

.cpb-capacity-info.show {
    display: block !important;
}

/* Booking Summary */
.cpb-booking-summary {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    margin-top: 30px;
    border-left: 4px solid #D9C46E;
}

.cpb-booking-summary h4 {
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0 0 15px 0;
    color: #1B1D2C;
}

.cpb-summary-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.cpb-summary-item {
    font-size: 0.95rem;
}

.cpb-summary-item strong {
    color: #1B1D2C;
}

/* Step Actions */
.cpb-step-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.cpb-button {
    background-color: #D9C46E;
    color: #000;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

/* Remove borders from all button variations */
.cpb-button,
.cpb-next-step,
.cpb-prev-step,
.cpb-calendar-nav,
.cpb-calendar-next,
.cpb-calendar-previous {
    border: none !important;
    outline: none;
}

.cpb-button:hover {
    background-color: #EAE0B9;
    transform: translateY(-1px);
}

.cpb-button:disabled {
    background-color: #ccc;
    color: #666;
    cursor: not-allowed;
    transform: none;
}

.cpb-button.cpb-submit-booking {
    background-color: #D9C46E;
    color: #000;
    padding: 15px 30px;
    font-size: 1.1rem;
}

.cpb-button.cpb-submit-booking:hover {
    background-color: #EAE0B9;
}

/* Messages */
#cpb-messages {
    margin-top: 20px;
}

.cpb-message {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-weight: 500;
}

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

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

.cpb-message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cpb-booking-container {
        padding: 15px;
    }
    
    .cpb-booking-header h2 {
        font-size: 2rem;
    }
    
    .cpb-booking-progress {
        display: none; /* Nasconde completamente la progress bar su mobile */
    }
    
    .cpb-booking-progress::before {
        display: none;
    }
    
    .cpb-languages-grid {
        grid-template-columns: 1fr;
    }
    
    .cpb-group-types {
        grid-template-columns: 1fr;
    }
    
    .cpb-form-row {
        grid-template-columns: 1fr;
    }
    
    .cpb-time-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
    
    .cpb-summary-details {
        grid-template-columns: 1fr;
    }
    
    .cpb-step-actions {
        flex-direction: column;
        gap: 15px;
    }
    
    .cpb-button {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .cpb-step-content {
        padding: 20px;
    }
    
    .cpb-booking-header {
        padding: 20px;
    }
    
    .cpb-booking-header h2 {
        font-size: 1.8rem;
    }
    
    .cpb-time-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Loading Animation */
.cpb-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #D9C46E;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Accessibility */
.cpb-language-option:focus,
.cpb-group-option:focus,
.cpb-time-slot:focus,
.cpb-button:focus {
    outline: 2px solid #D9C46E;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .cpb-booking-container {
        max-width: none;
        padding: 0;
    }
    
    .cpb-step-actions,
    .cpb-booking-progress {
        display: none;
    }
    
    .cpb-step-content {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Thank You Page Styles */
.cpb-thank-you-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    margin-top: 20px;
    animation: fadeInUp 0.6s ease-out;
}

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

.cpb-thank-you-container {
    max-width: 600px;
    text-align: center;
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.cpb-thank-you-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: block;
}

.cpb-thank-you-page h1 {
    color: #1B1D2C;
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-family: "Plus Jakarta Sans", sans-serif;
}

.cpb-thank-you-message {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

.cpb-thank-you-actions {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.cpb-btn-primary {
    background: #D4AF37;
    color: white;
}

.cpb-btn-primary:hover {
    background: #B8941F;
    transform: translateY(-2px);
}

.cpb-btn-secondary {
    background: #6c757d;
    color: white;
}

.cpb-btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* Mobile responsive for thank you page */
@media (max-width: 768px) {
    .cpb-thank-you-container {
        padding: 30px 20px;
    }
    
    .cpb-thank-you-page h1 {
        font-size: 2rem;
    }
    
    .cpb-thank-you-actions {
        flex-direction: column;
    }
    
    /* Calendar mobile styles */
    .cpb-calendar-container {
        margin: 0 -10px;
    }
    
    .cpb-calendar-header {
        padding: 12px 15px;
    }
    
    .cpb-calendar-title {
        font-size: 1rem;
    }
    
    .cpb-calendar-nav {
        padding: 6px 8px;
        font-size: 1rem;
    }
    
    .cpb-weekday {
        padding: 8px 4px;
        font-size: 0.8rem;
    }
    
    .cpb-calendar-day {
        padding: 8px 4px;
        min-height: 40px;
        font-size: 0.9rem;
    }
    
    .cpb-calendar-day.disabled-no-slots::before {
        width: 15px;
        height: 1px;
    }
}

/* Mass Request Checkbox Styling */
.cpb-mass-request-group {
    margin-top: 20px;
}

.cpb-checkbox-label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
}

.cpb-checkbox-label input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
    width: auto;
    min-width: auto;
    flex-shrink: 0;
}

.cpb-checkbox-text {
    color: #495057;
}

.cpb-checkbox-text a {
    color: #D9C46E;
    text-decoration: underline;
}

.cpb-checkbox-text a:hover {
    color: #B8A85A;
}
