﻿.programare-panel {
    max-width: 620px;
    margin: 0 auto;
}

.fade-panel {
    animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calendar-hint {
    max-width: 620px;
    margin: 10px auto 18px;
    font-size: 15px;
    color: #666;
    text-align: center;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

    .calendar-header h2 {
        font-size: 28px;
        margin: 0;
        font-weight: 700;
        color: #2f3349;
    }

    .calendar-header button {
        width: 48px;
        height: 48px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
    }

.weekdays,
.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

    .weekdays div {
        text-align: center;
        font-weight: 700;
        padding: 14px 0;
        font-size: 15px;
        color: #8592a3;
    }

.day {
    min-height: 68px;
    border: 1px solid #ddd;
    background: #f5f5f5;
    color: #aaa;
    border-radius: 14px;
    cursor: not-allowed;
    font-size: 19px;
    font-weight: 700;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

    .day.available {
        background: white;
        color: #696cff;
        border: 2px solid #696cff;
        cursor: pointer;
    }

        .day.available:hover {
            background: #eef0ff;
            border-color: #5f63f2;
            transform: translateY(-1px) scale(1.02);
            box-shadow: 0 6px 14px rgba(105, 108, 255, 0.18);
        }

    .day:focus {
        outline: 3px solid #8b8dff;
        outline-offset: 2px;
    }

    .day.weekend {
        background: #fafafa;
    }

    .day.available.weekend {
        background: white;
        color: #696cff;
        border: 2px solid #696cff;
    }

    .day.selected {
        background: #696cff;
        color: white;
        border-color: #696cff;
        box-shadow: 0 6px 18px rgba(105, 108, 255, 0.35);
    }

    .day.empty {
        visibility: hidden;
    }

    .day.disabled-past {
        opacity: 0.35;
    }

#findClosestAvailable {
    /*max-width: 620px;*/
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 0 auto 24px;
    padding: 16px 22px;
    border: 0;
    border-radius: 18px;
    background: linear-gradient(135deg, #696cff, #8b8dff);
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(105, 108, 255, 0.28);
    transition: all 0.18s ease;
}

    #findClosestAvailable::after {
        content: "";
        position: absolute;
        top: 0;
        left: -80px;
        width: 60px;
        height: 100%;
        background: rgba(255, 255, 255, 0.25);
        transform: skewX(-20deg);
        transition: left 0.35s ease;
    }

    #findClosestAvailable:hover {
        transform: translateY(-2px);
        box-shadow: 0 16px 34px rgba(105, 108, 255, 0.38);
        color: #fff;
    }

        #findClosestAvailable:hover::after {
            left: calc(100% + 80px);
        }

.find-closest-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 22px;
}

#findClosestAvailable:disabled {
    opacity: 0.7;
    cursor: wait;
    transform: none;
}

.month-empty-card {
    margin-top: 18px;
    padding: 24px 20px;
    border: 1px solid #dfe2ff;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff, #f7f8ff);
    text-align: center;
    box-shadow: 0 10px 24px rgba(47, 51, 73, 0.08);
}

.month-empty-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: #eef0ff;
    color: #696cff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
}

.month-empty-title {
    font-size: 18px;
    font-weight: 800;
    color: #2f3349;
    margin-bottom: 6px;
}

.month-empty-text {
    font-size: 15px;
    color: #697a8d;
    line-height: 1.5;
}

.month-empty-card .btn {
    border-radius: 12px;
    padding: 12px 18px;
    font-weight: 700;
    background: #696cff;
    border-color: #696cff;
}

    .month-empty-card .btn:hover {
        background: #5f63f2;
        border-color: #5f63f2;
    }

#availableHours {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
}

#availableHours button {
    width: 100%;
    min-height: 56px;
    margin: 0;
    padding: 14px 10px;
    border: 2px solid #696cff;
    color: #696cff;
    background: white;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

    #availableHours button:hover {
        background: #696cff;
        color: white;
        transform: translateY(-1px);
        box-shadow: 0 4px 10px rgba(105, 108, 255, 0.2);
    }

.empty-state {
    margin-top: 15px;
    padding: 14px;
    background: #fafafa;
    border: 1px solid #ddd;
    border-radius: 12px;
}

.error-state {
    margin-top: 15px;
    padding: 14px;
    background: #fff5f5;
    border: 1px solid #ffb3b3;
    border-radius: 12px;
    color: #9b0000;
}

.skeleton {
    height: 52px;
    margin: 10px 0;
    border-radius: 12px;
    background: linear-gradient( 90deg, #eef0ff, #f7f8ff, #eef0ff );
    animation: skeletonLoading 1s infinite linear;
}

@keyframes skeletonLoading {
    0% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.6;
    }
}

.hour-group-title {
    grid-column: 1 / -1;
    margin-top: 16px;
    margin-bottom: 4px;
    font-weight: 700;
    color: #2f3349;
}

.booking-card {
    position: relative;
    overflow: hidden;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #dfe2ff;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f7f8ff 100%);
    box-shadow: 0 10px 24px rgba(47, 51, 73, 0.08);
}

    .booking-card::before {
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        width: 5px;
        height: 100%;
        background: linear-gradient(180deg, #696cff, #8b8dff);
    }

.booking-card-title {
    margin-bottom: 16px;
    padding-left: 4px;
    font-size: 18px;
    font-weight: 800;
    color: #2f3349;
}

.booking-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 0;
    border-top: 1px solid #e7e9ff;
}

    .booking-row span {
        color: #697a8d;
        font-size: 15px;
        font-weight: 600;
    }

    .booking-row strong {
        color: #696cff;
        font-size: 16px;
        font-weight: 800;
        text-align: right;
    }

.confirm-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

    .confirm-actions .btn-outline-danger,
    #confirmBooking {
        color: #696cff;
        border-color: #696cff;
    }

        .confirm-actions .btn-outline-danger:hover,
        #confirmBooking:hover {
            background: #696cff;
            color: white;
        }

.slot-countdown {
    margin: 12px 0;
    padding: 12px;
    background: #fff8e6;
    /*border: 1px solid #ffd36b;
    border-radius: 12px;*/
    border-width: 1px 0 1px 0;
    border-color: #ffd36b;
    border-style: solid;
    font-size: 15px;
}

.toast-message {
    position: fixed;
    right: 18px;
    bottom: 18px;
    padding: 12px 16px;
    background: #2f3349;
    color: white;
    border-radius: 12px;
    font-size: 14px;
    z-index: 9999;
}

.hours-info-text {
    margin-top: 6px;
    margin-bottom: 18px;
    font-size: 15px;
    line-height: 1.5;
    color: #6c757d;
    text-align: center;
}
#prevMonth:disabled,
#nextMonth:disabled {
    cursor: not-allowed !important;
    opacity: 0.6;
    pointer-events: all !important;
}

.programare-cta-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 22px;
    border: 0 !important;
    border-radius: 18px;
    background: linear-gradient(135deg, #696cff, #8b8dff);
    color: #fff !important;
    font-size: 17px;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(105, 108, 255, 0.28);
    transition: all 0.18s ease;
}

    .programare-cta-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 14px 30px rgba(105, 108, 255, 0.34);
        color: #fff !important;
    }

    .programare-cta-btn:disabled {
        opacity: 0.7;
        cursor: wait;
        transform: none;
    }

.calendar-tooltip .tooltip-inner {
    background: #696cff;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(105, 108, 255, 0.25);
}

.calendar-tooltip.bs-tooltip-top .tooltip-arrow::before {
    border-top-color: #696cff;
}

.calendar-tooltip.bs-tooltip-bottom .tooltip-arrow::before {
    border-bottom-color: #696cff;
}

.programare-header {
    text-align: center;
    padding-top: 10px;
    padding-bottom: 10px;
    margin-bottom: 24px;
}

.programare-header-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: linear-gradient(135deg, #696cff, #8b8dff);
    color: #fff;
    font-size: 28px;
    box-shadow: 0 10px 24px rgba(105, 108, 255, 0.25);
}
    .programare-header-icon .bx {
        font-size: 34px;
    }

.programare-header-title {
    margin-bottom: 6px;
    font-size: 28px;
    font-weight: 800;
    color: #2f3349;
}

.programare-header-subtitle {
    font-size: 15px;
    color: #697a8d;
}

.programare-main-header {
    position: relative;
    display: grid;
    grid-template-columns: 160px 1fr 160px;
    align-items: center;
    text-align: center;
    gap: 12px;
}

.programare-header-left {
    text-align: left;
}

.programare-header-center h1 {
    font-weight: 800;
    color: #2f3349;
}

.programare-header-right {
    min-height: 1px;
}

.back-card {
    border-radius: 12px;
    padding: 10px 14px;
}

@media (max-width: 600px) {
    .programare-cta-btn {
        padding: 16px;
        font-size: 15px;
        border-radius: 16px;
    }

    .programare-panel {
        max-width: 100%;
        width: 100%;
    }

    #findClosestAvailable {
        padding: 15px;
        font-size: 15px;
        border-radius: 14px;
    }

    .calendar-hint {
        text-align: center;
        font-size: 14px;
    }

    .calendar-header h2 {
        font-size: 20px;
    }

    .calendar-header button {
        width: 44px;
        height: 44px;
    }

    .weekdays,
    .calendar-days {
        gap: 6px;
    }

        .weekdays div {
            padding: 8px 0;
            font-size: 14px;
        }

    .day {
        min-height: 58px;
        border-radius: 12px;
        font-size: 17px;
    }

    #availableHours {
        grid-template-columns: repeat(2, 1fr);
    }

        #availableHours button {
            width: 100%;
            margin: 0;
            padding: 14px 8px;
            font-size: 16px;
        }

    .hour-group-title {
        grid-column: 1 / -1;
        margin-top: 16px;
    }

    .booking-row {
        display: block;
    }

        .booking-row span {
            display: block;
            margin-bottom: 4px;
        }

    .confirm-actions {
        flex-direction: column;
    }

        .confirm-actions button,
        #backToCalendarFromHours,
        #backToHours,
        #goNextMonth,
        #retryCalendar,
        #retryHours {
            width: 100%;
            padding: 14px;
            font-size: 16px;
        }

    .slot-countdown {
        text-align: center;
    }

    .toast-message {
        left: 12px;
        right: 12px;
        bottom: 12px;
        text-align: center;
    }

    .hours-info-text {
        font-size: 14px;
        margin-bottom: 16px;
    }
    .month-empty-card {
        padding: 22px 16px;
        border-radius: 16px;
    }

    .booking-card {
        padding: 18px;
        border-radius: 16px;
    }

    .booking-row {
        display: block;
    }

        .booking-row span {
            display: block;
            margin-bottom: 4px;
        }

        .booking-row strong {
            display: block;
            text-align: left;
        }

    .programare-main-header {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .programare-header-left {
        order: 2;
        text-align: center;
    }

    .programare-header-center {
        order: 1;
    }

    .programare-header-right {
        display: none;
    }

    .back-card {
        width: 100%;
    }
}

@media (max-width: 380px) {
    .weekdays,
    .calendar-days {
        gap: 4px;
    }

    .day {
        min-height: 52px;
        font-size: 16px;
        border-radius: 10px;
    }

    .weekdays div {
        font-size: 13px;
    }

    .calendar-header h2 {
        font-size: 17px;
    }

    #availableHours {
        grid-template-columns: 1fr;
    }

    .hours-info-text {
        font-size: 14px;
        margin-bottom: 16px;
    }
}
