/**
 * Responsive Footer & Calendar CSS
 * Mobile-first responsive design for footer and calendar components
 */

/* ============================================
   RESPONSIVE FOOTER STYLES
   ============================================ */

/* Base Footer Styles */
.footer {
    background: #ffffff;
    padding: 60px 0 20px;
    border-top: 1px solid #E5E7EB;
}

.footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Footer About Section */
.footer__about {
    margin-bottom: 40px;
}

.footer__about__logo {
    margin-bottom: 20px;
}

.footer__about__logo .logo-main {
    max-height: 50px;
    width: auto;
    height: auto;
}

.footer__about p {
    color: #64748B;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 12px;
}

/* Footer Address Section */
.footer__address ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer__address ul li {
    margin-bottom: 20px;
}

.footer__address ul li span {
    display: block;
    font-weight: 600;
    color: #0F172A;
    font-size: 14px;
    margin-bottom: 8px;
}

.footer__address ul li p {
    margin: 0;
    color: #64748B;
    font-size: 14px;
}

.footer__address ul li a {
    color: #64748B;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer__address ul li a:hover {
    color: #1E40AF;
}

/* Footer Social Icons */
.footer__social {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.footer__social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F8F9FA;
    border-radius: 50%;
    color: #64748B;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 18px;
}

.footer__social a:hover {
    background: #1E40AF;
    color: #FFFFFF;
    transform: translateY(-2px);
}

/* Footer Widget (Links) */
.footer__widget {
    margin-bottom: 40px;
}

.footer__widget ul {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
}

.footer__widget ul:last-child {
    margin-bottom: 0;
}

.footer__widget ul li {
    margin-bottom: 12px;
}

.footer__widget ul li a {
    color: #64748B;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
    display: inline-block;
}

.footer__widget ul li a:hover {
    color: #1E40AF;
}

/* Footer Copyright */
.footer__copyright {
    padding-top: 30px;
    border-top: 1px solid #E5E7EB;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer__copyright__text p {
    margin: 0;
    color: #64748B;
    font-size: 13px;
}

.footer__copyright__links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.footer__copyright__links a {
    color: #64748B;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s ease;
}

.footer__copyright__links a:hover {
    color: #1E40AF;
}

/* ============================================
   MOBILE DEVICES (≤ 767px)
   ============================================ */

@media only screen and (max-width: 767px) {
    /* Footer Padding */
    .footer {
        padding: 40px 0 20px;
    }
    
    .footer .container {
        padding: 0 15px;
    }
    
    /* Footer Sections - Stack Vertically */
    .footer .row > div {
        margin-bottom: 30px;
    }
    
    .footer .row > div:last-child {
        margin-bottom: 0;
    }
    
    /* Footer About */
    .footer__about {
        text-align: center;
        margin-bottom: 30px;
    }
    
    .footer__about__logo {
        text-align: center;
        margin-bottom: 16px;
    }
    
    .footer__about__logo .logo-main {
        max-height: 42px;
        margin: 0 auto;
    }
    
    .footer__about p {
        font-size: 13px;
        text-align: center;
    }
    
    /* Footer Address */
    .footer__address {
        text-align: center;
        margin-bottom: 30px;
    }
    
    .footer__address ul li {
        margin-bottom: 16px;
    }
    
    .footer__address ul li span {
        font-size: 13px;
    }
    
    .footer__address ul li p,
    .footer__address ul li a {
        font-size: 13px;
    }
    
    /* Footer Social Icons - Center */
    .footer__social {
        justify-content: center;
        margin-top: 12px;
    }
    
    .footer__social a {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
    
    /* Footer Widget */
    .footer__widget {
        text-align: center;
        margin-bottom: 30px;
    }
    
    .footer__widget ul {
        margin-bottom: 24px;
    }
    
    .footer__widget ul li {
        margin-bottom: 10px;
    }
    
    .footer__widget ul li a {
        font-size: 14px;
    }
    
    /* Footer Copyright - Stack Vertically */
    .footer__copyright {
        flex-direction: column;
        text-align: center;
        padding-top: 20px;
        gap: 16px;
    }
    
    .footer__copyright__text {
        width: 100%;
    }
    
    .footer__copyright__text p {
        font-size: 12px;
    }
    
    .footer__copyright__links {
        justify-content: center;
        flex-wrap: wrap;
        gap: 16px;
    }
    
    .footer__copyright__links a {
        font-size: 12px;
    }
}

/* ============================================
   TABLET DEVICES (768px - 991px)
   ============================================ */

@media only screen and (min-width: 768px) and (max-width: 991px) {
    /* Footer Padding */
    .footer {
        padding: 50px 0 20px;
    }
    
    .footer .container {
        padding: 0 20px;
    }
    
    /* Footer Sections */
    .footer .row > div {
        margin-bottom: 40px;
    }
    
    /* Footer About */
    .footer__about {
        margin-bottom: 30px;
    }
    
    .footer__about__logo .logo-main {
        max-height: 46px;
    }
    
    /* Footer Widget */
    .footer__widget {
        margin-bottom: 30px;
    }
    
    /* Footer Copyright */
    .footer__copyright {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* ============================================
   RESPONSIVE CALENDAR STYLES
   ============================================ */

/* Calendar Container */
.calendar-container {
    padding: 40px 0;
    background: #F8F9FA;
    min-height: calc(100vh - 200px);
}

/* Calendar Header */
.calendar-header {
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    padding: 24px 32px;
    margin-bottom: 24px;
    border: 1px solid #E5E7EB;
}

.calendar-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #0F172A;
    margin: 0 0 8px 0;
}

.calendar-header p {
    color: #64748B;
    font-size: 14px;
    margin: 0;
}

/* Calendar Controls */
.calendar-controls {
    padding: 20px 24px;
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.calendar-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.calendar-nav button {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    color: #64748B;
    transition: all 0.2s ease;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-nav button:hover {
    background: #F8F9FA;
    border-color: #CBD5E1;
}

.calendar-nav span {
    font-weight: 600;
    color: #0F172A;
    font-size: 16px;
    white-space: nowrap;
}

/* Calendar Legend */
.calendar-legend {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #64748B;
}

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

/* Calendar Grid - Horizontal Scroll on Mobile */
.calendar-grid {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

.calendar-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1200px;
    table-layout: auto;
}

.calendar-table th {
    min-width: 140px;
    max-width: 180px;
    padding: 16px 12px;
    text-align: center;
    font-weight: 600;
    color: #0F172A;
    font-size: 14px;
    border-right: 1px solid #E5E7EB;
    white-space: nowrap;
    background: #F8F9FA;
    position: sticky;
    top: 0;
    z-index: 10;
}

.calendar-table th:first-child {
    text-align: left;
    padding-left: 24px;
    min-width: 100px;
    position: sticky;
    left: 0;
    z-index: 11;
    background: #F8F9FA;
}

.calendar-table td {
    padding: 10px 8px;
    border-right: 1px solid #E5E7EB;
    border-bottom: 1px solid #E5E7EB;
    vertical-align: top;
    min-height: 90px;
}

.calendar-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 9;
    background: #FFFFFF;
}

.time-label {
    font-weight: 600;
    color: #64748B;
    font-size: 14px;
    padding: 8px 12px;
    white-space: nowrap;
    background: #FFFFFF;
}

/* Time Slot */
.time-slot {
    width: 100%;
    min-height: 60px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    padding: 8px 6px;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
}

.time-slot.available {
    background: #10B981;
    color: #FFFFFF;
    border-color: #059669;
    font-weight: 600;
    cursor: pointer;
}

.time-slot.available:hover {
    background: #059669;
    transform: scale(1.02);
}

.time-slot.booked {
    background: #FEE2E2;
    color: #991B1B;
    border-color: #EF4444;
}

.time-slot.empty {
    background: #F8F9FA;
    border-color: #E5E7EB;
    min-height: 60px;
}

.time-slot.unavailable {
    background: #F3F4F6;
    color: #6B7280;
    border-color: #D1D5DB;
    cursor: not-allowed;
    opacity: 0.7;
}

/* ============================================
   MOBILE CALENDAR STYLES (≤ 767px)
   ============================================ */

@media only screen and (max-width: 767px) {
    /* Calendar Container */
    .calendar-container {
        padding: 20px 0;
    }
    
    .calendar-container .container {
        padding: 0 12px;
    }
    
    /* Calendar Header */
    .calendar-header {
        padding: 16px 20px;
        margin-bottom: 16px;
        border-radius: 8px;
    }
    
    .calendar-header h1 {
        font-size: 20px;
        margin-bottom: 6px;
    }
    
    .calendar-header p {
        font-size: 13px;
    }
    
    /* Calendar Controls */
    .calendar-controls {
        padding: 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .calendar-nav {
        width: 100%;
        justify-content: space-between;
        gap: 12px;
    }
    
    .calendar-nav button {
        padding: 10px 14px;
        min-width: 44px;
        min-height: 44px;
        font-size: 16px;
    }
    
    .calendar-nav span {
        font-size: 14px;
        flex: 1;
        text-align: center;
    }
    
    /* Calendar Legend */
    .calendar-legend {
        width: 100%;
        gap: 12px;
        justify-content: flex-start;
    }
    
    .legend-item {
        font-size: 12px;
        gap: 6px;
    }
    
    .legend-color {
        width: 14px;
        height: 14px;
    }
    
    /* Calendar Grid - Horizontal Scroll */
    .calendar-grid {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -12px;
        padding: 0 12px;
    }
    
    .calendar-table {
        min-width: 1000px;
        font-size: 12px;
    }
    
    .calendar-table th {
        padding: 12px 8px;
        font-size: 12px;
        min-width: 120px;
    }
    
    .calendar-table th:first-child {
        padding-left: 12px;
        min-width: 80px;
    }
    
    .calendar-table td {
        padding: 8px 6px;
        min-height: 70px;
    }
    
    .time-label {
        font-size: 12px;
        padding: 6px 8px;
    }
    
    /* Time Slot - Smaller on Mobile */
    .time-slot {
        min-height: 50px;
        padding: 6px 4px;
        font-size: 11px;
    }
    
    .time-slot-content {
        padding: 2px 4px;
        gap: 2px;
    }
    
    .time-slot-time {
        font-size: 11px;
        margin-bottom: 2px;
    }
    
    /* Back Link */
    .back-link {
        font-size: 14px;
        margin-bottom: 12px;
        padding: 0 12px;
    }
    
    /* Booking Success Modal - Mobile */
    .booking-success-modal__content {
        padding: 30px 20px;
        max-width: 90%;
        margin: 0 5%;
    }
    
    .booking-success-modal__icon {
        width: 60px;
        height: 60px;
        margin-bottom: 20px;
    }
    
    .booking-success-modal__icon i {
        font-size: 30px;
    }
    
    .booking-success-modal__title {
        font-size: 20px;
    }
    
    .booking-success-modal__message {
        font-size: 14px;
        margin-bottom: 24px;
    }
    
    .booking-success-modal__button {
        padding: 12px 24px;
        font-size: 14px;
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   TABLET CALENDAR STYLES (768px - 991px)
   ============================================ */

@media only screen and (min-width: 768px) and (max-width: 991px) {
    /* Calendar Container */
    .calendar-container {
        padding: 30px 0;
    }
    
    /* Calendar Header */
    .calendar-header {
        padding: 20px 24px;
    }
    
    .calendar-header h1 {
        font-size: 24px;
    }
    
    /* Calendar Controls */
    .calendar-controls {
        padding: 18px 20px;
    }
    
    .calendar-nav span {
        font-size: 15px;
    }
    
    /* Calendar Table */
    .calendar-table {
        min-width: 1100px;
    }
    
    .calendar-table th {
        padding: 14px 10px;
        font-size: 13px;
        min-width: 130px;
    }
    
    .calendar-table td {
        padding: 9px 7px;
    }
    
    /* Time Slot */
    .time-slot {
        min-height: 55px;
        padding: 7px 5px;
        font-size: 11px;
    }
}

/* ============================================
   CALENDAR SCROLL INDICATOR (Mobile)
   ============================================ */

@media only screen and (max-width: 767px) {
    .calendar-grid::after {
        content: '→';
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 24px;
        color: #1E40AF;
        opacity: 0.5;
        pointer-events: none;
        animation: pulse 2s infinite;
    }
    
    @keyframes pulse {
        0%, 100% {
            opacity: 0.5;
        }
        50% {
            opacity: 0.8;
        }
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Prevent horizontal scroll on body when calendar is scrolling */
body.calendar-scrolling {
    overflow-x: hidden;
}

/* Touch-friendly calendar buttons */
@media (max-width: 767px) {
    .calendar-nav button,
    .calendar-booking-btn,
    .time-slot.available {
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
}

/* ============================================
   MOBILE CALENDAR CARDS (≤ 767px)
   ============================================ */

/* Hide desktop table on mobile */
@media only screen and (max-width: 767px) {
    .calendar-grid {
        display: none !important;
    }
}

/* Mobile Calendar Container */
.mobile-calendar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0;
}

/* Mobile Calendar Card */
.mobile-calendar-card {
    background: #FFFFFF;
    border-radius: 12px;
    border: 1px solid #E5E7EB;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Mobile Calendar Card Header */
.mobile-calendar-card__header {
    background: #F8F9FA;
    padding: 16px;
    border-bottom: 2px solid #E5E7EB;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-calendar-card__date {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mobile-calendar-card__day {
    font-size: 18px;
    font-weight: 700;
    color: #0F172A;
    line-height: 1.2;
}

.mobile-calendar-card__month-day {
    font-size: 14px;
    font-weight: 500;
    color: #64748B;
    line-height: 1.2;
}

.mobile-calendar-card__year {
    font-size: 14px;
    font-weight: 500;
    color: #94A3B8;
}

/* Mobile Calendar Card Slots */
.mobile-calendar-card__slots {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Mobile Time Slot */
.mobile-time-slot {
    width: 100%;
    padding: 14px 16px;
    border-radius: 8px;
    border: 2px solid transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
    min-height: 56px;
    box-sizing: border-box;
    cursor: pointer;
    background: #F8F9FA;
    border-color: #E5E7EB;
}

.mobile-time-slot__time {
    font-size: 15px;
    font-weight: 600;
    color: #0F172A;
    flex: 1;
}

.mobile-time-slot__status {
    font-size: 13px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 6px;
    background: #E5E7EB;
    color: #64748B;
}

/* Available Time Slot */
.mobile-time-slot--available {
    background: #10B981 !important;
    border-color: #059669 !important;
    color: #FFFFFF !important;
}

.mobile-time-slot--available .mobile-time-slot__time {
    color: #FFFFFF !important;
}

.mobile-time-slot--available .mobile-time-slot__status {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #FFFFFF !important;
}

.mobile-time-slot--available:active {
    background: #059669 !important;
    transform: scale(0.98);
}

/* Booked Time Slot */
.mobile-time-slot--booked {
    background: #FEE2E2 !important;
    border-color: #EF4444 !important;
    cursor: default !important;
}

.mobile-time-slot--booked .mobile-time-slot__time {
    color: #991B1B !important;
}

.mobile-time-slot--booked .mobile-time-slot__status {
    background: #EF4444 !important;
    color: #FFFFFF !important;
}

/* Unavailable Time Slot */
.mobile-time-slot--unavailable {
    background: #F3F4F6 !important;
    border-color: #D1D5DB !important;
    cursor: not-allowed !important;
    opacity: 0.7;
}

.mobile-time-slot--unavailable .mobile-time-slot__time {
    color: #6B7280 !important;
}

.mobile-time-slot--unavailable .mobile-time-slot__status {
    background: #D1D5DB !important;
    color: #6B7280 !important;
}

/* Mobile Time Slot Form */
.mobile-time-slot-form {
    margin: 0;
    padding: 0;
    width: 100%;
}

.mobile-time-slot-form button {
    width: 100%;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    text-align: left;
}

/* No Slots Message */
.mobile-calendar-card__no-slots {
    padding: 24px 16px;
    text-align: center;
}

.mobile-calendar-card__no-slots p {
    margin: 0;
    color: #94A3B8;
    font-size: 14px;
    font-style: italic;
}

/* Loading State for Mobile Slots */
.mobile-time-slot.loading {
    opacity: 0.6;
    pointer-events: none;
}

.mobile-time-slot.loading .mobile-time-slot__status::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Mobile Calendar - Show only on mobile */
@media only screen and (min-width: 768px) {
    .mobile-calendar {
        display: none !important;
    }
}
