/**
 * Cannulation Training (Post 397) - Professional Card Design
 * Modern, responsive design inspired by index.html
 * Uses theme-integrated green color scheme
 * Version: 1.0.0
 */

/* ====================================
   MAIN WRAPPER & CONTAINER
   ==================================== */
.phuk-397-modern .single-booking-option-top-card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    border-top: 2px solid #469861;
    margin-bottom: 20px;
}

/* ====================================
   MODERN HEADER (Replaces Classroom Session Box)
   ==================================== */
.la-compact-header-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.la-compact-header-wrapper .header-icon {
    color: #469861;
}

.la-compact-header-wrapper .header-icon svg {
    width: 28px;
    height: 28px;
    stroke-width: 2.5;
}

.la-compact-header-wrapper p {
    margin: 0;
    font-size: 30px;
    font-weight: 600;
    color: #1f2937;
    text-align: center;
}

#phuk-schedule-tabs {
    margin-top: 0;
}

/* ====================================
   TAB NAVIGATION
   ==================================== */
.phuk-tab-widget .phuk-tab-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 0 0 1.5rem;
    padding: 0;
    list-style: none;
}

.phuk-tab-widget .phuk-tab-nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.875rem 1.5rem !important;
    border: 2px solid #d1d5db !important;
    background-color: #ffffff;
    color: #374151;
    font-weight: 500;
    font-size: 20px;
    cursor: pointer;
    border-radius: 8px !important;
    transition: all 0.3s ease;
    flex-shrink: 0;
    position: relative;
}

.phuk-tab-widget .phuk-tab-nav-item:hover {
    border-color: #469861;
    background-color: #f0fdf4;
}

.phuk-tab-widget .phuk-tab-nav-item.active {
    background-color: #469861 !important;
    color: #ffffff;
    border-color: #469861 !important;
    font-weight: 600 !important;
}

/* Active Tab Icon (Check Circle) */
.phuk-tab-widget .phuk-tab-nav-item::before {
    content: '';
    display: none;
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 11.08V12a10 10 0 1 1-5.93-9.14'%3E%3C/path%3E%3Cpolyline points='22 4 12 14.01 9 11.01'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.phuk-tab-widget .phuk-tab-nav-item.active::before {
    display: inline-block;
}

/* ====================================
   CONDITIONAL TEXT BELOW TABS
   ==================================== */
.phuk-tab-conditional-text {
    background-color: #19875412;
    border-left: 2px solid #112e31;
    color: #374151;
    padding: 1rem 1.25rem;
    border-radius: 6px;
    margin: 18px 10px;
    line-height: 1.6;
}

div#phuk-tab-conditional-text p {
    font-size: 18px;
    font-weight: 400;
}

.phuk-tab-conditional-text a.switch-tab-link {
    color: #469861;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.2s ease;
}

.phuk-tab-conditional-text a.switch-tab-link:hover {
    color: #198754;
}

/* ====================================
   TAB PANELS
   ==================================== */
.phuk-tab-panel {
    display: none;
}

.phuk-tab-panel.active {
    display: block;
    padding: 15px;
}

/* ====================================
   SCHEDULE CARDS - MODERN DESIGN
   ==================================== */
.tab-schedule {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.single-booking-row {
    background-color: #ffffff;
    border-bottom: 1px dashed #112e31;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.single-booking-row:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.1);
}

/* Card Header (Date) */
.single-booking-row-header {
    background-color: #112e31;
    padding: 1rem 1.5rem;
    font-weight: 600;
    font-size: 1.125rem;
    color: #ffffff;
    border-bottom: 2px solid #449764;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
}

/* Card Title (Training Program Name) */
.phuk-card-title {
    display: block;
    width: 100%;
    font-size: 0.8rem;
    font-weight: 700;
    color: #7bdcb5;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Card Body - Two Column Layout */
.single-booking-row-body {
    display: flex;
    flex-wrap: wrap;
    padding: 1.5rem;
    gap: 1.5rem;
    background-color: #30ac6003;
}

.single-booking-row-left {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 280px;
    flex: 2;
}

.single-booking-row-right {
    flex: 1;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
}

.single-booking-row-header p {
    font-weight: 600;
    font-size: 1.125rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Card Tags (Duration, Time, Location) */
.la-compact-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.la-compact-tag {
display: inline-flex
;
    line-height: 0;
    align-items: center;
    gap: 0.4rem;
    background-color: #ffffffb3;
    color: #112e31;
    padding: 0.35rem 0rem;
    /* border-radius: 4px; */
    font-size: 0.875rem;
    font-weight: 600;
    border-bottom: 1px dashed #112e3166;
}

.la-compact-tag i {
    color: #469861;
    font-size: 1rem;
}

/* Venue/Address */
.la-compact-card__venue {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 1rem !important;
    color: #034d2b;
    line-height: 1.5;
}

.la-compact-card__venue i {
    color: #469861;
    margin-top: 2px;
    flex-shrink: 0;
}

/* Availability Status */
.la-compact-card__availability {
    font-weight: 600;
    font-size: 1rem;
    color: #dc2626;
    display: flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    padding: 4px 7px;
    border-radius: 4px;
    border: 1px dashed;
}

.la-compact-card__availability i {
    font-size: 1rem;
}

.la-compact-card__availability.in-stock {
    color: #dc3545;
}

.la-compact-card__availability.out-of-stock {
    color: #6c757d;
    padding: 4px 6px;
}

/* Price Display */
.la-compact-price {
    text-align: right;
    margin-bottom: 0.75rem;
}

.la-compact-price .current-price {
    font-size: 1.875rem;
    font-weight: 700;
    color: #198754;
    display: block;
    line-height: 1.2;
}

.la-compact-price .original-price {
    text-decoration: line-through;
    color: #9ca3af;
    font-size: 1.125rem;
    display: block;
    margin-top: 0.25rem;
}

/* Book Now Button */
.la-compact-book-btn {
    background-color: #469861;
    color: white;
    border: 2px solid #7bdcb5;
    padding: 0.875rem 1.75rem;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.la-compact-book-btn:hover {
    background-color: #367d51;
    border-color: #5db894;
    transform: translateY(-1px);
}

.la-compact-book-btn:active {
    transform: translateY(0);
}

.la-compact-book-btn.disabled,
.la-compact-book-btn:disabled {
    background-color: #ff5252;
    color: #ffffff;
    border-color: #d1d5db;
    cursor: not-allowed;
    transform: none;
}

.la-compact-book-btn.disabled:hover,
.la-compact-book-btn:disabled:hover {
    background-color: #e5e7eb;
    transform: none;
}

/* ====================================
   PAGINATION (SEE MORE/LESS)
   ==================================== */
.la-compact-pagination {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    padding-top: 1.5rem;
}

#see-more-dates-btn,
.pti-see-more-dates,
.pti-see-less-dates {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #469861;
    border: 2px solid #7bdcb5;
    color: #ffffff;
    padding: 0.75rem 1.75rem;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#see-more-dates-btn:hover,
.pti-see-more-dates:hover,
.pti-see-less-dates:hover {
    background-color: #367d51;
    border-color: #5db894;
    transform: translateY(-1px);
}

/* ====================================
   MODAL SPECIFIC STYLES
   ==================================== */
#enquiryBookingModal .phuk-tab-widget {
    margin-top: 0;
}

#enquiryBookingModal .phuk-tab-nav {
    margin-bottom: 1.25rem;
}

#enquiryBookingModal .single-booking-row {
    margin-bottom: 1rem;
}

#enquiryBookingModal .modal-body {
    padding: 1rem;
    overflow: hidden;
}

.phuk-modal-schedule-container {
    margin-top: 30px;
}

/* Modal Header */
#enquiryBookingModal .modal-header {
    background-color: #212529;
    color: white;
    padding: 1.25rem 1.5rem;
    border-bottom: 2px solid #198754;
    border-radius: 5px 5px 0 0;
}

#enquiryBookingModal .modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

#enquiryBookingModal .header-icon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Modal Close Button Fix */
#enquiryBookingModal .modal-close-btn {
    /* background: transparent;
    border: 1px solid #fff;
    color: #112e31;
    border-radius: 50px;
    font-size: 1.30rem;
    font-weight: 700;
    line-height: 1;
    background-color: #fff;
    cursor: pointer;
    padding: 4px 8px;
    transition: all 0.2s ease;
    opacity: 0.8; */
    padding: 0;
    background: transparent;
}

button#modal-close-397 svg {
    display: inline-flex;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #dc3545;
    color: white;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    opacity: 0.8;
}

button#modal-close-397 svg:hover {
    background-color: #c82333 !important;
    transform: scale(1.1);
    opacity: 1;
}

#enquiryBookingModal .modal-close-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

#enquiryBookingModal .modal-content {
    border: 2px solid #198754 !important;
    padding: 0 !important;
}



/* Styling for the container */
.phuk-modal-schedule-container {
  margin-top: 30px;
  overflow-y: auto; /* Allows the scrollbar to appear when needed */
  height: 500px;
  scrollbar-width: auto; /* Firefox */
}

/* Custom scrollbar styles */
.phuk-modal-schedule-container::-webkit-scrollbar {
  width: 8px; /* Adjust the width of the scrollbar */
  display: block; /* Make the scrollbar visible only when needed */
}

.phuk-modal-schedule-container::-webkit-scrollbar-track {
  background-color: #112E31; /* Light background for the scrollbar track */
  border-radius: 10px; /* Rounded corners for track */
}

.phuk-modal-schedule-container::-webkit-scrollbar-thumb {
  background-color: #1eb770; /* Main color for the thumb */
  border-radius: 10px; /* Rounded corners for the thumb */
  border: 2px solid #112E31; /* Border for the thumb */
}

.phuk-modal-schedule-container::-webkit-scrollbar-thumb:hover {
  background-color: #3b7a53; /* Darker shade on hover for thumb */
}

/* Remove the arrows (not needed for modern scrollbars) */
.phuk-modal-schedule-container::-webkit-scrollbar-button {
  display: none;
}




/* ====================================
   RESPONSIVE DESIGN
   ==================================== */

/* Tablets */
@media (max-width: 768px) {
    .phuk-tab-nav-item {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }

    .single-booking-row-body {
        padding: 1.25rem;
        gap: 1.25rem;
    }

    .single-booking-row-left,
    .single-booking-row-right {
        min-width: 100%;
    }

    .single-booking-row-right {
        align-items: flex-start;
    }

    .la-compact-price {
        text-align: left;
    }

    .la-compact-price .current-price {
        font-size: 1.625rem;
    }
}

/* Mobile Phones */
@media (max-width: 480px) {
    .phuk-397-modern .single-booking-option-top-card {
        border-radius: 6px !important;
        border-top-width: 2px;
        padding: 12px 8px !important;
    }

    .phuk-tab-panel.active {
        padding: 0px !important;
    }

    .la-compact-card__venue {
        gap: 6px;
        font-size: 16px !important;
        margin: 0;
        align-items: center;
    }

    .phuk-tab-nav {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .phuk-tab-widget .phuk-tab-nav-item {
        width: 100%;
        padding: 0.875rem 1rem !important;
        font-size: 16px !important;
    }

    .phuk-tab-conditional-text {
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
    }

    .single-booking-row-header {
        padding: 0.875rem 1.25rem;
        font-size: 1rem;
    }

    .single-booking-row-body {
        padding: 1rem;
        gap: 1rem;
    }

    .la-compact-card__tags {
        gap: 0.75rem;
    }

    .la-compact-tag {
        font-size: 14px !important;
        border-bottom: 1px dashed #112e3136;
        border-left: none;
        padding: 0.35rem 0rem;
    }

    .la-compact-card__availability {
        font-size: 16px;
    }

    .single-booking-row-header p {
        font-size: 18px;
    }


    .la-compact-price .current-price {
        font-size: 1.5rem;
    }

    .la-compact-price .original-price {
        font-size: 1rem;
    }

    .la-compact-book-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
    }

    /* Modal Specific Mobile */
    #enquiryBookingModal .modal-content {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }

    #enquiryBookingModal .modal-header {
        padding: 1rem 1.25rem;
    }

    #enquiryBookingModal .modal-title {
        font-size: 1.25rem;
    }

    #enquiryBookingModal .modal-body {
        padding: 1rem;
    }

    .la-compact-header-wrapper p {
        font-size: 18px;
    }

    .la-compact-header-wrapper .header-icon svg {
        width: 20px;
        height: 20px;
        stroke-width: 2.5;
    }

    .single-booking-row-right {
        align-items: end;
    }

    .la-compact-card__availability {
        margin-top: 1rem;
    }

    .single-booking-row-right {
        align-items: center;
        flex-direction: row;
        border-top: 1px dashed #112e3140;
        padding-top: 15px;
    }

    .la-compact-price {
        display: flex;
        gap: 6px;
        margin-bottom: 0 !important;
    }

    .la-compact-tag svg {
        width: 28px;
        vertical-align: middle;
    }

    .la-compact-tag:last-child {
        flex-basis: 100%;
        align-items: center;
        gap: 0.4rem;
        padding: 0;
        font-size: 16px !important;
        border-radius: 0;
        background: transparent;
        border: none;
        margin-bottom: 8px;
        color: #004d2d;
    }

    .la-compact-tag:last-child svg {
        height: 28px;
    }

    p.la-compact-card__venue svg {
        width: 35px;
        height: 35px;
    }

    div#phuk-tab-conditional-text p {
        font-size: 18px;
        font-weight: 400;
    }

    #mobileModal .btn-close {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        cursor: pointer !important;
        background-color: #dc3545;
        background-repeat: no-repeat;
        background-position: center;
        background-size: 8px;
        transition: opacity 0.2s ease, transform 0.2s ease;
        border: 2px solid #ffa6a6;
    }

    #mobileModal .modal-content {
        background-color: #f8f8f8;
        margin: auto;
        padding: 0px;
    }

    #mobileModal .modal-header {
        position: relative;
        top: 7px;
        right: 0;
        z-index: 1;
    }

    #mobileModal .phuk-397-modern .single-booking-option-top-card {
        border-top-width: 2px;
        padding: 12px 8px !important;
        margin-top: -42px;
        border-radius: 7px !important;
    }

    #phuk-schedule-tabs .phuk-tab-nav {
        display: flex;
        gap: 8px;
        list-style: none;
        padding: 0;
        margin: 20px 0 15px !important;
        flex-wrap: wrap;
    }

    #mobileModal .la-compact-header-wrapper {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 12px;
        text-align: left;
    }


    #mobileModal #show-classroom-schedule-wrap {
        margin-top: 30px;
        overflow-y: auto; 
        height: 500px;
        scrollbar-width: auto;
    }

    /* Custom scrollbar styles */
    #mobileModal #show-classroom-schedule-wrap::-webkit-scrollbar {
        width: 6px; 
        display: block; 
    }

    #mobileModal #show-classroom-schedule-wrap::-webkit-scrollbar-track {
        background-color: #112E31; /* Light background for the scrollbar track */
        border-radius: 10px; /* Rounded corners for track */
    }

    #mobileModal #show-classroom-schedule-wrap::-webkit-scrollbar-thumb {
        background-color: #1eb770; /* Main color for the thumb */
        border-radius: 10px; /* Rounded corners for the thumb */
        border: 2px solid #112E31; /* Border for the thumb */
    }

    #mobileModal #show-classroom-schedule-wrap::-webkit-scrollbar-thumb:hover {
        background-color: #3b7a53; /* Darker shade on hover for thumb */
    }

    /* Remove the arrows (not needed for modern scrollbars) */
    #mobileModal #show-classroom-schedule-wrap::-webkit-scrollbar-button {
        display: none;
    }

    #mobileModal .phuk-tab-panel.active {
        padding: 0px 5px !important;
    }
}

/* ====================================
   LEGACY CLASS SUPPORT
   ==================================== */
/* Map old classes to new design for backward compatibility */
.phuk-397-modern #show-classroom-schedule-wrap .single-booking-row {
    display: block;
}

.phuk-397-modern .single-booking-row .float-row {
    clear: both;
    overflow: visible;
}

/* Override old styles for this specific page */
.phuk-397-modern .single-booking-left {
    float: none;
    width: 100%;
    padding: 0;
}

.phuk-397-modern .single-booking-right {
    float: none;
    width: 100%;
    padding: 0;
}

/* ====================================
   UTILITY CLASSES
   ==================================== */
.phuk-hidden {
    display: none !important;
}

.phuk-visible {
    display: block !important;
}

/* ====================================
   ACCESSIBILITY
   ==================================== */
.phuk-tab-nav-item:focus {
    outline: 2px solid #469861;
    outline-offset: 2px;
}

.la-compact-book-btn:focus {
    outline: 2px solid #469861;
    outline-offset: 2px;
}

/* Screen reader only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ====================================
   ANIMATION
   ==================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.phuk-tab-panel.active {
    animation: fadeIn 0.3s ease-in-out;
}

/* ====================================
   PRINT STYLES
   ==================================== */
@media print {
    .phuk-tab-nav,
    .phuk-tab-conditional-text,
    .la-compact-book-btn,
    .la-compact-pagination {
        display: none !important;
    }

    .phuk-tab-panel {
        display: block !important;
    }

    .single-booking-row {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }
}