/* Styles for Candy Dance Club schedule and booking form */

/* Wrapper for the entire schedule */
/* Calendar grid layout: seven columns for days of the week */
.cdp-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

/* Day column styling */
.cdp-day {
    background: linear-gradient(135deg, #2c2c2c, #1a1a1a);
    border-radius: 12px;
    padding: 0.8rem;
    min-height: 250px;
    display: flex;
    flex-direction: column;
}

/* Day header */
.cdp-day-title {
    text-align: center;
    font-weight: 700;
    color: #ffc0cb;
    margin-bottom: 0.6rem;
    font-size: 1rem;
}

/* Message when no classes in a day */
.cdp-no-classes {
    font-size: 0.9rem;
    color: #ffb3c9;
    text-align: center;
    margin-top: 1rem;
}

/* Individual class cards */
.cdp-card {
    background: linear-gradient(135deg, #3a3a3a, #2a2a2a);
    border-radius: 18px;
    padding: 1.5rem 1.8rem;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    text-align: center;
}

.cdp-card:hover {
    transform: translateY(-6px);
    border-color: #ff6b9d;
    box-shadow: 0 15px 30px rgba(255, 107, 157, 0.25);
}

.cdp-card h3 {
    color: #ffc0cb;
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.cdp-card .cdp-time,
.cdp-card .cdp-teacher {
    font-size: 0.95rem;
    color: #ffb3c9;
    margin-bottom: 0.5rem;
}

.cdp-card .cdp-seats {
    font-size: 0.9rem;
    color: #fff;
    opacity: 0.8;
    margin-bottom: 1rem;
}

.cdp-book-btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background: linear-gradient(45deg, #ff6b9d, #ffc0cb);
    color: #2c2c2c;
    border: none;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(255, 107, 157, 0.35);
}

.cdp-book-btn:hover:not([disabled]) {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(255, 107, 157, 0.5);
}

/* spacing for cards inside a day column */
.cdp-day .cdp-card {
    margin-bottom: 0.8rem;
}
.cdp-day .cdp-card:last-child {
    margin-bottom: 0;
}

/* Modal overlay */
.cdp-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.cdp-modal.open {
    display: flex;
}

.cdp-modal-content {
    background: #2c2c2c;
    padding: 2rem;
    border-radius: 14px;
    width: 90%;
    max-width: 480px;
    /* Ensure the modal can grow vertically while not overflowing the viewport. */
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 30px rgba(255, 107, 157, 0.2);
}

.cdp-modal-content h4 {
    font-size: 1.6rem;
    color: #ffc0cb;
    margin-bottom: 1rem;
    text-align: center;
}

.cdp-modal-content label {
    display: block;
    margin-bottom: 0.4rem;
    color: #ffc0cb;
    font-weight: 600;
}

.cdp-modal-content input,
.cdp-modal-content select {
    width: 100%;
    padding: 0.5rem 0.8rem;
    margin-bottom: 0.8rem;
    border: 1px solid #444;
    border-radius: 6px;
    background: #3a3a3a;
    color: #fff;
}

.cdp-modal-content button[type="submit"] {
    display: block;
    width: 100%;
    padding: 0.7rem;
    font-size: 1rem;
    background: linear-gradient(45deg, #ff6b9d, #ffc0cb);
    color: #2c2c2c;
    border: none;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.cdp-modal-content button[type="submit"]:hover {
    transform: translateY(-3px);
}

.cdp-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #ffc0cb;
    cursor: pointer;
}

.cdp-success-message {
    color: #ffc0cb;
    margin-top: 1rem;
    font-size: 0.95rem;
}

.cdp-alternative h5 {
    font-size: 1.1rem;
    color: #ffc0cb;
    margin-bottom: 0.5rem;
}

.cdp-alternative ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.cdp-alternative ul li {
    color: #fff;
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
}

/*
 * Toast notification shown after a successful booking. Positioned fixed at the bottom
 * of the viewport and centered horizontally. Uses the same pink gradient as buttons
 * and subtle shadow for visibility. Hidden by default and shown via JavaScript.
 */
.cdp-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(45deg, #ff6b9d, #ffc0cb);
    color: #2c2c2c;
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    z-index: 10000;
    box-shadow: 0 4px 10px rgba(255, 107, 157, 0.3);
    font-weight: 600;
    font-size: 0.95rem;
}

/* Close button inside the toast notification. It sits next to the message and allows
 * the user to dismiss the notification manually. The button has no background
 * and uses the same text color for consistency. */
.cdp-toast-close {
    background: none;
    border: none;
    color: #2c2c2c;
    font-size: 1.2rem;
    line-height: 1;
    padding: 0 0.4rem;
    margin-left: 0.6rem;
    cursor: pointer;
}

/*
 * Notes displayed below the payment selector. The abonement note is always visible,
 * whereas the prepay note is toggled via JavaScript. Both notes share the same
 * typography for consistency. They use a slightly smaller font size to avoid
 * overwhelming the form and maintain readability on small screens.
 */
.cdp-abon-note,
.cdp-prepay-note {
    color: #ffc0cb;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    line-height: 1.3;
}

/* Кнопка оплаты через Сбербанк */
.cdp-payment-button {
    margin-top: 1rem;
    text-align: center;
}

.cdp-pay-btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: linear-gradient(45deg, #21a038, #4caf50);
    color: #fff;
    text-decoration: none;
    border-radius: 40px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(33, 160, 56, 0.35);
    border: none;
    cursor: pointer;
}

.cdp-pay-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(33, 160, 56, 0.5);
    color: #fff;
    text-decoration: none;
}


/* Уведомление об оплате наличными */
.cdp-payment-cash-note {
    color: #ffc107;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    line-height: 1.3;
    font-style: italic;
    text-align: center;
    padding: 0.5rem;
    background: rgba(255, 193, 7, 0.1);
    border-radius: 6px;
    border-left: 3px solid #ffc107;
}


/* Responsive: collapse calendar columns on smaller screens */
@media (max-width: 1024px) {
    .cdp-calendar {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 640px) {
    .cdp-calendar {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* On very small screens show one day per row */
@media (max-width: 480px) {
    .cdp-calendar {
        grid-template-columns: repeat(1, 1fr);
    }
    .cdp-day {
        min-height: auto;
    }
}

/*
 * Additional mobile tweaks for improved readability and usability on small screens.
 * These adjustments reduce padding and font sizes for cards and the modal on narrow viewports
 * while maintaining the overall look and feel of the theme. They also ensure that the
 * booking button and headings remain legible on devices such as smartphones.
 */
@media (max-width: 640px) {
    .cdp-card {
        padding: 1rem;
    }
    .cdp-card .cdp-time,
    .cdp-card .cdp-teacher,
    .cdp-card .cdp-seats {
        font-size: 0.85rem;
    }
    .cdp-book-btn {
        font-size: 0.8rem;
        padding: 0.5rem 1.2rem;
    }
    .cdp-day-title {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .cdp-card {
        padding: 0.8rem;
    }
    .cdp-modal-content {
        width: 95%;
        padding: 1.5rem;
    }
    .cdp-modal-content h4 {
        font-size: 1.4rem;
    }
    .cdp-modal-content label,
    .cdp-modal-content input,
    .cdp-modal-content select {
        font-size: 0.9rem;
    }
    .cdp-modal-content button[type="submit"] {
        font-size: 0.9rem;
        padding: 0.6rem;
    }
}

