/* ==========================================================================
   TABLE OF CONTENTS
   ========================================================================== */

/* 1. GENERAL STYLES */
/* 2. FACET WP SELECTIONS */
/* 3. PROVIDER GRID LAYOUT */
/* 4. NEXTPATIENT WIDGETS - PRIMARY */
/* 5. NEXTPATIENT WIDGETS - SIDEBAR */
/* 6. PROVIDER GRID RESPONSIVE OVERRIDES */
/* 7. PROVIDER SPECIALTIES & CERTIFICATIONS */
/* 8. MOBILE BOOK APPOINTMENT */
/* 9. MENU & NAVIGATION */
/* 10. MARQUEE ANIMATION */
/* 11. COUNTERS & LAYOUT */
/* 12. LOCATIONS */
/* 13. INSURANCE & FINANCIAL */
/* 14. UTILITY CLASSES */

/* ==========================================================================
   1. GENERAL STYLES
   ========================================================================== */
.menu-smart i.menu-icon.fa-external-link {
   margin-left: 9px;
   margin-right: 0;
   position: absolute;
   right: 14px;
   top: 20px;
}

   .aqua-map img {
	border-radius: 12px !important;	
}

.aqua-services .tmb.tmb-grid .t-inside {
	border-radius: 12px !important;
}

.cat-promotions .blog-book-appt, .cat-events .blog-book-appt {display: none !important;}

article p a {
    text-decoration: underline;
}

.fuzzy-bg .uncol {
   position: relative;
}

.wed-plastic-section li {
	font-size: 20px;
}

small, figcaption {
    font-size: 15px;
}

@media only screen and (min-width:500px) and (max-width:959px) { 
	.wed-plastic-section ul {
  columns: 2;
  column-gap: 40px; 
  list-style-position: inside; 
}
}


/* BASE STYLES - Ensure consistent positioning context */
.fuzzy-bg .uncol {
    position: relative;
    isolation: isolate; /* Create stacking context */
}

/* LIGHT BLUR - for style-light text */
.fuzzy-bg .uncol.style-light::before {
    content: '';
    position: absolute;
    top: -100px;
    left: -400px;
    right: -100px;
    bottom: -100px;
    background: radial-gradient(ellipse 60% 70% at 40% 60%, 
        rgba(255, 255, 255, 0.8) 0%, 
        rgba(255, 255, 255, 0.6) 15%, 
        rgba(255, 255, 255, 0.4) 30%, 
        rgba(255, 255, 255, 0.25) 45%, 
        rgba(255, 255, 255, 0.15) 60%, 
        rgba(255, 255, 255, 0.08) 75%, 
        rgba(255, 255, 255, 0.03) 85%, 
        rgba(255, 255, 255, 0.01) 95%, 
        transparent 100%);
    -webkit-filter: blur(30px);
    filter: blur(30px);
    z-index: -1;
    border-radius: 60% 40% 80% 20%;
    pointer-events: none; /* Prevent interference with interactions */
    will-change: transform; /* Optimize for animations/transforms */
    transform: translate3d(0, 0, 0); /* Force GPU acceleration */
    -webkit-transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* DARK BLUR - for style-dark text */
.fuzzy-bg .uncol.style-dark::before {
    content: '';
    position: absolute;
    top: -300px;
    left: -200px;
    right: -100px;
    bottom: -100px;
    background: radial-gradient(ellipse 60% 70% at 40% 60%, 
        rgba(0, 0, 0, 0.8) 0%, 
        rgba(0, 0, 0, 0.6) 15%, 
        rgba(0, 0, 0, 0.4) 30%, 
        rgba(0, 0, 0, 0.25) 45%, 
        rgba(0, 0, 0, 0.15) 60%, 
        rgba(0, 0, 0, 0.08) 75%, 
        rgba(0, 0, 0, 0.03) 85%, 
        rgba(0, 0, 0, 0.01) 95%, 
        transparent 100%);
    -webkit-filter: blur(30px);
    filter: blur(30px);
    z-index: -1;
    border-radius: 60% 40% 80% 20%;
    pointer-events: none;
    will-change: transform;
    transform: translate3d(0, 0, 0); /* Force GPU acceleration */
    -webkit-transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}


/* TABLET ADJUSTMENTS */
@media (max-width: 1024px) {
    .fuzzy-bg .uncol.style-light::before,
    .fuzzy-bg .uncol.style-dark::before {
        -webkit-filter: blur(40px);
        filter: blur(40px);
    }
}

/* MOBILE ADJUSTMENTS - SIMPLIFIED FOR BETTER PERFORMANCE */
@media (max-width: 768px) { 
    .fuzzy-bg .uncol.style-light::before {
        top: -20px;
        left: -60px;
        right: -60px;
        bottom: -40px;
        background: rgba(255, 255, 255, 0.4);
        -webkit-filter: blur(8px);
        filter: blur(8px);
        border-radius: 50%;
    }
    
    .fuzzy-bg .uncol.style-dark::before {
        top: -40px;
        left: -60px;
        right: -60px;
        bottom: -40px;
        background: rgba(0, 0, 0, 0.3);
        -webkit-filter: blur(8px);
        filter: blur(8px);
        border-radius: 50%;
    }

    /* Button styling for mobile */
    .fuzzy-bg .btn-white {
        color: #ffffff !important;
        background-color: #0057af !important;
        border-color: #0057af !important;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    
    /* Reduce background image opacity on mobile */
    .fuzzy-bg .background-inner {
        opacity: 0.4;
    }
}

@media (max-width: 767px) {
    
}

/* EXTRA SMALL MOBILE - FURTHER SIMPLIFIED */
@media (max-width: 480px) {
    .fuzzy-bg .uncol.style-light::before {
        top: -10px;
        left: -40px;
        right: -40px;
        bottom: -30px;
        background: rgba(255, 255, 255, 0.3);
        -webkit-filter: blur(6px);
        filter: blur(6px);
    }
    
    .fuzzy-bg .uncol.style-dark::before {
        top: -20px;
        left: -40px;
        right: -40px;
        bottom: -30px;
        background: rgba(0, 0, 0, 0.25);
        -webkit-filter: blur(6px);
        filter: blur(6px);
    }
    
    /* Further reduce background opacity on very small screens */
    .fuzzy-bg .background-inner {
        opacity: 0.3;
    }
}

/* FALLBACK FOR BROWSERS THAT DON'T SUPPORT BACKDROP-FILTER */
@supports not (backdrop-filter: blur(10px)) {
    .fuzzy-bg .btn-white {
        background-color: rgba(255, 255, 255, 0.9) !important;
        color: #0057af !important;
    }
}

/* HIGH DPI/RETINA DISPLAY OPTIMIZATIONS */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .fuzzy-bg .uncol.style-light::before,
    .fuzzy-bg .uncol.style-dark::before {
        transform: translate3d(0, 0, 0); /* Force hardware acceleration */
        -webkit-transform: translate3d(0, 0, 0);
    }
}

/* ==========================================================================
   2. FACET WP SELECTIONS
   ========================================================================== */

/* Style the image container for overflow handling */
.fwpl-item.el-dt925u {
  overflow: hidden;
  transition: all 0.3s ease;
}

/* Style the image link */
.fwpl-item.el-dt925u a {
  display: block;
  overflow: hidden;
}

/* Style the image for smooth transitions */
.fwpl-item.el-dt925u img {
  transition: transform 0.3s ease, filter 0.3s ease;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Hover effect triggered by hovering ANYWHERE on the entire card */
.fwpl-col.el-ymt9ah:hover .fwpl-item.el-dt925u img {
  transform: scale(1.1); /* Zoom in by 10% */
  filter: brightness(0.9); /* Darken by 10% */
}

/* Optional: Add subtle shadow to image container when card is hovered */
.fwpl-col.el-ymt9ah:hover .fwpl-item.el-dt925u {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Ensure all buttons and links remain fully clickable */
.fwpl-item.el-es29kh a,
.fwpl-item.el-xcdz5j a,
.fwpl-item.el-1jdxae a,
.fwpl-item.el-dt925u a {
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

.facetwp-selections ul::before {
    display: inline-block;
    content: 'Your Selections: ';
    font-weight: bold;
}

.facetwp-selections li {
    display: inline-block;
    line-height: 1;
    padding: 8px 16px;
    margin: 0px 6px;
    border-radius: 4px;
    background: #f8f8f8;
    font-size: 18px;
}

.facetwp-selections .facetwp-selection-value {
    color: #0057af;
}

.facetwp-selections .facetwp-selection-label {
    display: none;
}

/* ==========================================================================
   3. PROVIDER GRID LAYOUT - MAIN STRUCTURE
   ========================================================================== */

/* Target the main layout container */
.fwpl-layout.el-ptvr9j {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

/* Target each result card */
.fwpl-layout.el-ptvr9j .fwpl-result {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Target the row inside each result */
.fwpl-layout.el-ptvr9j .fwpl-result .fwpl-row.el-yqt486 {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Target the column container */
.fwpl-layout.el-ptvr9j .fwpl-result .fwpl-row.el-yqt486 .fwpl-col.el-ymt9ah {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 400px;
}

/* Target the image container */
.fwpl-layout.el-ptvr9j .fwpl-result .fwpl-item.el-dt925u {
    text-align: center;
    margin-bottom: 16px;
	overflow: hidden;
	position: relative;
}

.fwpl-item.el-dt925u {
  overflow: hidden;
  transition: 0.3s;
  border-radius: 10px;  /* ← Add this */
}

.fwpl-layout.el-ptvr9j .fwpl-result .fwpl-item.el-dt925u:before {
	content: '';
	position: absolute;
	display: block;
	inset: 0;
	background: #000;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: all 0.3s ease 0.1s;
	z-index: 2;
}

/* Target the images */
.fwpl-layout.el-ptvr9j .fwpl-result .fwpl-item.el-dt925u img {
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: 1 / 1 !important;
    object-fit: cover;
	transition: transform 1s ease;
	border-radius: 10px;
}

.fwpl-layout.el-ptvr9j .fwpl-result .fwpl-item.el-dt925u:hover img {
	transform: scale(1.1);
	border-radius: 10px;	
}
.fwpl-layout.el-ptvr9j .fwpl-result .fwpl-item.el-dt925u:hover:before {
	opacity: 0.2;
	visibility: visible;
}


/* Target the name container */
.fwpl-layout.el-ptvr9j .fwpl-result .fwpl-item.el-es29kh {
    text-align: center;
    margin-bottom: 20px;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
}

/* Target the name heading */
.fwpl-layout.el-ptvr9j .fwpl-result .fwpl-item.el-es29kh h3.h6 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

/* Target the name link */
.fwpl-layout.el-ptvr9j .fwpl-result .fwpl-item.el-es29kh h3.h6 a {
    text-decoration: none;
    color: inherit;
}

.fwpl-layout.el-ptvr9j .fwpl-result .fwpl-item.el-es29kh h3.h6 a:hover {
    color: #0057af ;
}

/* Target the View button container */
.fwpl-layout.el-ptvr9j .fwpl-result .fwpl-item.el-xcdz5j.view-more {
    margin-bottom: 12px;
    margin-top: 0;
    width: 100%;
}

/* Target the View button */
.fwpl-layout.el-ptvr9j .fwpl-result .fwpl-item.el-xcdz5j.view-more .fwpl-btn {
    display: block;
    width: 100%;
    padding: 12px 24px;
    background-color: #f8f9fa !important;
    color: #333 !important;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

/* Target the View button hover */
.fwpl-layout.el-ptvr9j .fwpl-result .fwpl-item.el-xcdz5j.view-more .fwpl-btn:hover {
    background-color: #e9ecef !important;
    transform: translateY(-1px);
}

/* Target the Book Appointment button container */
.fwpl-layout.el-ptvr9j .fwpl-result .fwpl-item.el-1jdxae.book {
    margin-bottom: 0;
    width: 100%;
}

/* Target the Book Appointment button */
.fwpl-layout.el-ptvr9j .fwpl-result .fwpl-item.el-1jdxae.book .fwpl-btn {
    display: block;
    width: 100%;
    padding: 12px 24px;
    background-color: #0057af !important;
    color: white !important;
    border: 1px solid #0057af;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

/* Target the Book Appointment button hover */
.fwpl-layout.el-ptvr9j .fwpl-result .fwpl-item.el-1jdxae.book .fwpl-btn:hover {
    background-color: #3c5aa6 !important;
    transform: translateY(-1px);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .fwpl-layout.el-ptvr9j {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 16px;
    }
    
    .fwpl-layout.el-ptvr9j .fwpl-result {
        padding: 16px;
    }
    
    .fwpl-layout.el-ptvr9j .fwpl-result .fwpl-item.el-dt925u img {
        width: 100% !important;
    }
}

/* ==========================================================================
   4. NEXTPATIENT WIDGETS - PRIMARY
   ========================================================================== */

/**
 * Comprehensive NextPatient CSS
 * Water's Edge Dermatology - WeDerm2
 * 
 * Sections:
 * 1. Base Styles & Typography
 * 2. Form Criteria Layout (merged desktop/tablet/mobile approach)
 * 3. Form Field Styling
 * 4. Provider Cards & Tables
 * 5. Timeslot Buttons
 * 6. Sidebar Layouts (Provider Pages)
 * 7. Animations & Transitions
 * 8. Responsive Breakpoints
 */

/* ============================================================================
   1. BASE STYLES & TYPOGRAPHY
   ========================================================================= */

#nextpatient-widget\.1.aqua-book-appt,
.aqua-book-appt {
    font-family: inherit;
    line-height: 1.6;
}

.nextpatient-box {
    width: 100%;
    max-width: 1000px;
    text-align: left;
    padding-bottom: 40px;
}

.nextpatient-font {
    font-size: 16px;
}

.nextpatient-no-times-available {
    font-size: 1.2em;
    margin-top: 5px;
    padding: 10px 0;
}

.nextpatient-provider-table .nextpatient-provider-image-cell {
	border-radius: 12px;
}

.nextpatient-provider-table .nextpatient-provider {
    margin: 16px 0px !important;
	border-radius: 12px;
}

/* ============================================================================
   2. FORM CRITERIA LAYOUT - COMPACT & CONSISTENT
   ========================================================================= */

/* Base container - compact flexbox layout */
.nextpatient-criteria-container {
    display: flex !important;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 4px;
    margin-bottom: 0;
    row-gap: 4px;
}

/* Base criteria box - flex column, no margins */
.nextpatient-criteria-box {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

/* DESKTOP (>800px) - Compact single-line layout */
@media (min-width: 801px) {
    .nextpatient-criteria-container,
    .aqua-book-appt .nextpatient-criteria-container {
        display: flex !important;
        flex-wrap: wrap;
        align-items: flex-end;
        gap: 4px;
        margin-bottom: 0;
        row-gap: 4px;
    }
    
    .nextpatient-criteria-box,
    .aqua-book-appt .nextpatient-criteria-box {
        flex: 0 0 auto;
        margin: 0;
        padding: 0;
    }
    
    /* Visit Type - first */
    .nextpatient-criteria-box:has(select[name="group"]),
    .aqua-book-appt .nextpatient-criteria-box:has(select[name="group"]),
    .nextpatient-criteria-box:nth-child(1),
    .aqua-book-appt .nextpatient-criteria-box:nth-child(1) {
        flex: 0 1 auto;
        order: 1;
    }
    
    /* Visit Reason - second */
    .nextpatient-criteria-box:has(select[name="reason_id"]),
    .aqua-book-appt .nextpatient-criteria-box:has(select[name="reason_id"]),
    .nextpatient-criteria-box:nth-child(2),
    .aqua-book-appt .nextpatient-criteria-box:nth-child(2) {
        flex: 0 1 auto;
        order: 2;
    }
    
    /* Age field - hidden */
    .nextpatient-criteria-box:has(input[name="age"]),
    .aqua-book-appt .nextpatient-criteria-box:nth-child(3):has(input[name="age"]) {
        display: none !important;
    }
    
    /* Insurance - third (after Visit Type and Reason) */
    .nextpatient-criteria-box:has(select[name="insurance_id"]),
    .aqua-book-appt .nextpatient-criteria-box:has(select[name="insurance_id"]) {
        flex: 0 1 auto;
        order: 3;
    }
    
    /* Where/Zip field - fourth, MUST stay with Search */
    .nextpatient-criteria-box:has(input[name="zip"]),
    .aqua-book-appt .nextpatient-criteria-box:has(input[name="zip"]),
    .nextpatient-criteria-box:nth-child(4),
    .aqua-book-appt .nextpatient-criteria-box:nth-child(4) {
        flex: 0 1 auto;
        order: 4;
        flex-shrink: 1;
        flex-grow: 0;
        margin-right: 0;
        min-width: 0;
        width: auto;
    }
    
    /* Submit button - fourth, MUST stay with Where */
    .nextpatient-criteria-box:has(input[type="submit"]),
    .aqua-book-appt .nextpatient-criteria-box:has(input[type="submit"]),
    .nextpatient-criteria-box:nth-child(5),
    .aqua-book-appt .nextpatient-criteria-box:nth-child(5) {
        flex: 0 0 auto;
        order: 4;
        flex-shrink: 0;
        margin-left: 0;
        min-width: 100px;
    }
    
    /* CRITICAL: Ensure Where and Search wrap together */
    .nextpatient-criteria-box:has(input[name="zip"]) + .nextpatient-criteria-box:has(input[type="submit"]),
    .aqua-book-appt .nextpatient-criteria-box:has(input[name="zip"]) + .nextpatient-criteria-box:has(input[type="submit"]),
    .nextpatient-criteria-box:nth-child(4) + .nextpatient-criteria-box:nth-child(5),
    .aqua-book-appt .nextpatient-criteria-box:nth-child(4) + .nextpatient-criteria-box:nth-child(5) {
        margin-left: 0;
    }
    
    /* SINGLE LOCATION PAGE - Simplified layout: Insurance + Submit on second line */
    /* Visit Type and Visit Reason - 50/50 split on first line, MUST stay together */
    .single-location .nextpatient-criteria-container {
        flex-wrap: wrap !important;
    }
    
    .single-location .nextpatient-criteria-box:has(select[name="group"]),
    .single-location .nextpatient-criteria-box:nth-child(1) {
        order: 1 !important;
        flex: 0 0 calc(50% - 2px) !important;
        min-width: 0 !important;
        max-width: calc(50% - 2px) !important;
        width: calc(50% - 2px) !important;
        flex-basis: calc(50% - 2px) !important;
        flex-shrink: 0 !important;
        margin-right: 0 !important;
    }
    
    .single-location .nextpatient-criteria-box:has(select[name="reason_id"]),
    .single-location .nextpatient-criteria-box:nth-child(2) {
        order: 2 !important;
        flex: 0 0 calc(50% - 2px) !important;
        min-width: 0 !important;
        max-width: calc(50% - 2px) !important;
        width: calc(50% - 2px) !important;
        flex-basis: calc(50% - 2px) !important;
        flex-shrink: 0 !important;
        margin-right: 0 !important;
    }
    
    /* Visit Type on single location - truncate with ellipsis */
    .single-location .nextpatient-criteria-box:has(select[name="group"]) select,
    .single-location .nextpatient-criteria-box:nth-child(1) select {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        padding-right: 40px !important;
    }
    
    /* Visit Reason on single location - truncate with ellipsis */
    .single-location .nextpatient-criteria-box:has(select[name="reason_id"]) select,
    .single-location .nextpatient-criteria-box:nth-child(2) select {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        padding-right: 40px !important;
    }
    
    /* Insurance - force to second line, but allow Submit to sit next to it */
    .single-location .nextpatient-criteria-box:has(select[name="insurance_id"]) {
        order: 3;
        flex: 1 1 calc(100% - 120px); /* Leave room for Submit button + gap */
        min-width: 200px;
        max-width: calc(100% - 120px);
        margin-top: 4px;
        margin-right: 0;
    }
    
    /* Submit button - also on second line, positioned after Insurance */
    .single-location .nextpatient-criteria-box:has(input[type="submit"]) {
        order: 3;
        flex: 0 0 auto;
        margin-left: 4px;
        margin-top: 4px;
        align-self: flex-end;
    }
    
    /* Hide Where field on single location pages (if present) */
    .single-location .nextpatient-criteria-box:has(input[name="zip"]) {
        display: none !important;
    }
}

/* TABLET LAYOUT (600-800px) - Compact with controlled wrapping */
@media (min-width: 600px) and (max-width: 800px) {
    .nextpatient-criteria-container,
    .aqua-book-appt .nextpatient-criteria-container {
        flex-wrap: wrap;
        gap: 4px;
        row-gap: 4px;
        margin-bottom: 0;
    }
    
    .nextpatient-criteria-box,
    .aqua-book-appt .nextpatient-criteria-box {
        flex: 0 1 auto;
        margin: 0;
    }
    
    /* Visit Type - first */
    .nextpatient-criteria-box:has(select[name="group"]),
    .aqua-book-appt .nextpatient-criteria-box:has(select[name="group"]),
    .nextpatient-criteria-box:nth-child(1),
    .aqua-book-appt .nextpatient-criteria-box:nth-child(1) {
        flex: 1 1 48%;
        min-width: 0;
        order: 1;
    }
    
    /* Visit Reason - second */
    .nextpatient-criteria-box:has(select[name="reason_id"]),
    .aqua-book-appt .nextpatient-criteria-box:has(select[name="reason_id"]),
    .nextpatient-criteria-box:nth-child(2),
    .aqua-book-appt .nextpatient-criteria-box:nth-child(2) {
        flex: 1 1 48%;
        min-width: 0;
        order: 2;
    }
    
    /* Insurance - third (full width on tablet) */
    .nextpatient-criteria-box:has(select[name="insurance_id"]),
    .aqua-book-appt .nextpatient-criteria-box:has(select[name="insurance_id"]) {
        flex: 1 1 100%;
        min-width: 0;
        order: 3;
    }
    
    /* Where field - fourth, keep with Search */
    .nextpatient-criteria-box:has(input[name="zip"]),
    .aqua-book-appt .nextpatient-criteria-box:nth-child(4),
    .aqua-book-appt .nextpatient-criteria-box:has(input[name="zip"]) {
        flex: 0 0 auto;
        order: 4;
        flex-shrink: 0;
    }
    
    /* Zip and miles inputs on tablet */
    .aqua-book-appt .nextpatient-criteria-box:nth-child(4) input[name="zip"],
    .aqua-book-appt .nextpatient-criteria-box:has(input[name="zip"]) input[name="zip"] {
        flex: 1 1 120px;
        min-width: 100px;
        width: auto;
    }
    
    .aqua-book-appt .nextpatient-criteria-box:nth-child(4) select[name="max_miles"],
    .aqua-book-appt .nextpatient-criteria-box:has(input[name="zip"]) select[name="max_miles"] {
        flex: 0 0 auto;
        width: auto;
        min-width: 120px;
        max-width: none;
    }
    
    /* Submit button - fourth, MUST stay with Where */
    .nextpatient-criteria-box:has(input[type="submit"]),
    .aqua-book-appt .nextpatient-criteria-box:nth-child(5),
    .aqua-book-appt .nextpatient-criteria-box:has(input[type="submit"]) {
        flex: 0 0 auto;
        order: 4;
        flex-shrink: 0;
        min-width: 100px;
    }
}

/* MOBILE LAYOUT (<600px) - Full width stacked, compact */
@media (max-width: 599px) {
    .nextpatient-criteria-container,
    .aqua-book-appt .nextpatient-criteria-container {
        flex-direction: column !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        row-gap: 8px !important;
        margin-bottom: 0 !important;
        align-items: stretch !important;
    }
    
    .nextpatient-criteria-box,
    .aqua-book-appt .nextpatient-criteria-box {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        flex: 1 1 100% !important;
        margin: 0 !important;
        order: initial !important;
        flex-shrink: 1 !important;
        flex-grow: 1 !important;
        flex-basis: auto !important;
    }
    
    /* Reset any inline styles from JavaScript on mobile */
    .nextpatient-criteria-box:has(input[name="zip"]),
    .aqua-book-appt .nextpatient-criteria-box:has(input[name="zip"]),
    .nextpatient-criteria-box:has(input[type="submit"]),
    .aqua-book-appt .nextpatient-criteria-box:has(input[type="submit"]) {
        order: initial !important;
        flex: 1 1 100% !important;
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Ensure all inputs and selects are full width on mobile */
    .nextpatient-criteria-box select,
    .nextpatient-criteria-box input,
    .aqua-book-appt .nextpatient-criteria-box select,
    .aqua-book-appt .nextpatient-criteria-box input {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Where field inputs on mobile - full width, stacked vertically */
    .aqua-book-appt .nextpatient-criteria-box:nth-child(4) .nextpatient-criteria-input,
    .aqua-book-appt .nextpatient-criteria-box:has(input[name="zip"]) .nextpatient-criteria-input {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        width: 100% !important;
        max-width: 100% !important;
        align-items: stretch !important;
        box-sizing: border-box !important;
    }
    
    .aqua-book-appt .nextpatient-criteria-box:nth-child(4) input[name="zip"],
    .aqua-book-appt .nextpatient-criteria-box:has(input[name="zip"]) input[name="zip"],
    .aqua-book-appt .nextpatient-criteria-box:nth-child(4) select[name="max_miles"],
    .aqua-book-appt .nextpatient-criteria-box:has(input[name="zip"]) select[name="max_miles"] {
        flex: 1 1 auto !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Ensure the Where box itself doesn't overflow */
    .aqua-book-appt .nextpatient-criteria-box:nth-child(4),
    .aqua-book-appt .nextpatient-criteria-box:has(input[name="zip"]) {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: visible !important;
    }
}

/* Age field - hidden per client request */
.nextpatient-criteria-box:has(input[name="age"]) {
    display: none !important;
}

/* Fallback for browsers without :has() support */
@supports not selector(:has(*)) {
    .nextpatient-criteria-box {
        min-width: 150px;
    }
    
    .nextpatient-criteria-box select {
        min-width: 150px;
    }
}

/* ============================================================================
   3. FORM FIELD STYLING
   ========================================================================= */

/* Labels */
.aqua-book-appt .nextpatient-criteria-label,
.nextpatient-criteria-label {
    display: block;
    margin: 0 0 4px 2px;
    padding-top: 2px;
    font-size: 14px;
    color: #5a5a5a;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    min-width: max-content;
    width: 100%;
}

.aqua-book-appt .nextpatient-criteria-label label {
    font-size: 0.9em;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
    display: block;
}

/* Hide any labels that contain only "within" text */
.aqua-book-appt .nextpatient-criteria-label:empty,
.nextpatient-criteria-label:empty {
    display: none !important;
}

/* Input wrapper */
.aqua-book-appt .nextpatient-criteria-input,
.nextpatient-criteria-input {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Where field - hide "within" text without hiding inputs, keep compact */
.aqua-book-appt .nextpatient-criteria-box:nth-child(4) .nextpatient-criteria-input,
.aqua-book-appt .nextpatient-criteria-box:has(input[name="zip"]) .nextpatient-criteria-input {
    display: flex !important;
    align-items: flex-end !important;
    gap: 2px !important;
    flex-wrap: nowrap !important;
    font-size: 0 !important; /* Hides text nodes */
    margin: 0;
    padding: 0;
}

/* Restore font size for inputs only */
.aqua-book-appt .nextpatient-criteria-box:nth-child(4) .nextpatient-criteria-input input,
.aqua-book-appt .nextpatient-criteria-box:nth-child(4) .nextpatient-criteria-input select,
.aqua-book-appt .nextpatient-criteria-box:has(input[name="zip"]) .nextpatient-criteria-input input,
.aqua-book-appt .nextpatient-criteria-box:has(input[name="zip"]) .nextpatient-criteria-input select {
    font-size: 18px !important;
}

/* Select elements - adapt to content, prevent truncation */
/* JavaScript will set explicit widths - these are fallbacks */
.nextpatient-criteria-box select,
.aqua-book-appt .nextpatient-criteria-box select {
    width: auto;
    min-width: 0;
    max-width: none;
    font-size: 18px;
    min-height: 48px;
    padding: 10px 40px 10px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    background: white;
    color: #333;
    transition: width 0.2s;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    line-height: 1.5;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    /* JavaScript will override with calculated widths */
}

/* Visit Reason - truncate with ellipsis before chevron */
.nextpatient-criteria-box:has(select[name="reason_id"]) select,
.aqua-book-appt .nextpatient-criteria-box:has(select[name="reason_id"]) select {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    padding-right: 40px !important; /* Ensure chevron space is reserved */
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Insurance field - MUST truncate with ellipsis due to very long names */
/* Ensure padding-right accounts for chevron so ellipsis appears before it */
.nextpatient-criteria-box:has(select[name="insurance_id"]) select,
.aqua-book-appt .nextpatient-criteria-box:has(select[name="insurance_id"]) select {
    max-width: 100%;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    padding-right: 40px !important; /* Ensure chevron space is reserved */
    box-sizing: border-box !important;
}

/* Desktop and Tablet: Set reasonable max-width for insurance field */
@media (min-width: 600px) {
    .nextpatient-criteria-box:has(select[name="insurance_id"]),
    .aqua-book-appt .nextpatient-criteria-box:has(select[name="insurance_id"]) {
        flex: 0 1 auto;
        max-width: 400px;
        min-width: 200px;
    }
    
    .nextpatient-criteria-box:has(select[name="insurance_id"]) select,
    .aqua-book-appt .nextpatient-criteria-box:has(select[name="insurance_id"]) select {
        width: 100%;
        max-width: 100%;
    }
}

/* Ensure selects can expand naturally - browsers size selects to longest option */
.aqua-book-appt .nextpatient-criteria-box {
    overflow: visible;
    width: auto;
    min-width: max-content;
    /* Auto width allows natural sizing - ensure box is wide enough for label and select */
}

.aqua-book-appt .nextpatient-criteria-input {
    overflow: visible;
    min-width: 0;
    width: auto;
    display: inline-flex;
}

/* Custom dropdown arrow */
.nextpatient-criteria-box select,
.aqua-book-appt .nextpatient-criteria-input select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

/* Visit Type - truncate with ellipsis before chevron */
.nextpatient-criteria-box:has(select[name="group"]) select,
.aqua-book-appt .nextpatient-criteria-box:has(select[name="group"]) select {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    padding-right: 40px !important; /* Ensure chevron space is reserved */
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Visit Reason - truncate with ellipsis (handled above) */

/* Only make Where field inputs inline/auto width on desktop */
@media (min-width: 801px) {
    .aqua-book-appt .nextpatient-criteria-box:has(input[name="zip"]) .nextpatient-criteria-input input[type="text"],
    .aqua-book-appt .nextpatient-criteria-box:nth-child(4) input[name="zip"] {
        flex: 1 1 120px;
        width: 120px;
        min-width: 100px;
        max-width: 150px;
    }
    
    .aqua-book-appt .nextpatient-criteria-box:has(input[name="zip"]) .nextpatient-criteria-input select,
    .aqua-book-appt .nextpatient-criteria-box:nth-child(4) select[name="max_miles"] {
        flex: 0 0 auto;
        width: auto;
        min-width: 120px;
        max-width: none;
    }
}

/* Input elements */
.nextpatient-criteria-box input[type="text"],
.nextpatient-criteria-box input[name="age"],
.nextpatient-criteria-box input[name="zip"],
.aqua-book-appt .nextpatient-criteria-input input[type="text"],
.aqua-book-appt .nextpatient-criteria-input input[name="age"],
.aqua-book-appt .nextpatient-criteria-input input[name="zip"] {
    width: 100%;
    font-size: 18px;
    min-height: 48px;
    padding: 10px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    background: white;
    color: #333;
    transition: all 0.2s;
    box-sizing: border-box;
    line-height: 1.5;
}

/* Location page specific - consistent border radius */
.single-location .nextpatient-criteria-container select,
.single-location .nextpatient-criteria-container input[type="text"],
.single-location .nextpatient-criteria-container input[type="number"],
.single-location .nextpatient-criteria-container input[name="age"],
.single-location .nextpatient-criteria-container input[type="submit"] {
    border-radius: 8px;
}

/* Submit button */
.nextpatient-criteria-box input[type="submit"],
.aqua-book-appt .nextpatient-criteria-input input[type="submit"],
.aqua-book-appt .nextpatient-criteria-box input[type="submit"] {
    min-width: 80px;
    padding: 10px 24px;
    border-radius: 8px;
    background: linear-gradient(135deg, #0057af 0%, #0066bb 100%);
    color: white;
    border: none;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: auto;
    min-height: 48px;
    line-height: 1.5;
}

/* Hover states */
.aqua-book-appt .nextpatient-criteria-input input:hover,
.aqua-book-appt .nextpatient-criteria-input select:hover {
    border-color: #0057af;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.aqua-book-appt .nextpatient-criteria-input input[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 84, 154, 0.3);
    background: linear-gradient(135deg, #003d73 0%, #004d8a 100%);
}

/* Focus states */
.aqua-book-appt .nextpatient-criteria-input input:focus,
.aqua-book-appt .nextpatient-criteria-input select:focus {
    outline: none;
    border-color: #0057af;
    box-shadow: 0 0 0 3px rgba(0, 84, 154, 0.1);
}

/* Mobile - full width inputs */
@media (max-width: 599px) {
    .nextpatient-criteria-box select,
    .nextpatient-criteria-box input,
    .aqua-book-appt .nextpatient-criteria-box select,
    .aqua-book-appt .nextpatient-criteria-box input {
        width: 100% !important;
    }
}

/* ============================================================================
   4. PROVIDER CARDS & TABLES
   ========================================================================= */

.aqua-book-appt .nextpatient-provider-table,
.nextpatient-provider-table {
    margin-top: 30px;
    text-align: left;
}

.aqua-book-appt .nextpatient-provider,
.nextpatient-provider-table .nextpatient-provider {
    margin-bottom: 30px;
    border: 1px solid #e8ecef;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s;
    background: white;
    display: flex;
    align-items: flex-start;
    padding: 10px;
    margin: 16px 0 !important;
}

.aqua-book-appt .nextpatient-provider:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border-color: #0057af;
}

/* Provider image cell - Standardized across all widget types */
.nextpatient-provider-table .nextpatient-provider-image-cell,
.aqua-book-appt .nextpatient-provider-image-cell,
#nextpatient-widget\.2978 .nextpatient-provider-image-cell,
[id^="nextpatient-widget"] .nextpatient-provider-image-cell {
    width: 160px;
    height: auto;
    min-height: 140px;
    max-height: 308px;
    background-size: cover;
    background-position: center center;
    flex-shrink: 0;
    border-radius: 12px;
    aspect-ratio: auto;
}

/* ============================================================================
   PROVIDER IMAGE FIXES - Mobile & Responsive
   ========================================================================= */

/* Small photo - show on mobile with rounded corners, float next to info */
@media (max-width: 600px) {
    /* Show the name-block-left container on mobile if it has the small photo */
    .aqua-book-appt .nextpatient-provider-name-block-left:has(.nextpatient-provider-small-photo),
    .nextpatient-provider-table .nextpatient-provider-name-block-left:has(.nextpatient-provider-small-photo) {
        display: block !important;
    }
    
    /* Small photo - float next to provider information */
    .aqua-book-appt .nextpatient-provider-small-photo,
    .nextpatient-provider-table .nextpatient-provider-small-photo {
        display: block !important;
        float: left !important;
        max-height: 140px !important;
        height: 140px !important;
        width: 140px !important;
        min-height: 100px;
        min-width: 100px;
        aspect-ratio: 1 / 1;
        background-size: cover !important;
        background-position: center center !important;
        flex-shrink: 0;
        border-radius: 6px !important;
        margin-right: 16px !important;
        margin-bottom: 12px !important;
    }
    
    /* If small photo exists, hide large image */
    .aqua-book-appt .nextpatient-provider:has(.nextpatient-provider-small-photo) .nextpatient-provider-image-cell,
    .nextpatient-provider-table .nextpatient-provider:has(.nextpatient-provider-small-photo) .nextpatient-provider-image-cell {
        display: none !important;
    }
    
    /* If NO small photo exists, show large image (floated, constrained) */
    .aqua-book-appt .nextpatient-provider:not(:has(.nextpatient-provider-small-photo)) .nextpatient-provider-image-cell,
    .nextpatient-provider-table .nextpatient-provider:not(:has(.nextpatient-provider-small-photo)) .nextpatient-provider-image-cell {
        display: block !important;
        float: left !important;
        max-height: 140px !important;
        height: 140px !important;
        width: 140px !important;
        min-height: 100px;
        min-width: 100px;
        aspect-ratio: 1 / 1;
        background-size: cover !important;
        background-position: center center !important;
        flex-shrink: 0;
        border-radius: 6px !important;
        margin-right: 16px !important;
        margin-bottom: 12px !important;
    }
    
    /* Ensure provider name block wraps around floated photo */
    .aqua-book-appt .nextpatient-provider-name-block,
    .nextpatient-provider-table .nextpatient-provider-name-block {
        display: block !important;
        overflow: hidden !important;
    }
}

/* Prevent large photo from getting ridiculously tall around 500px breakpoint */
/* This applies when large photo IS visible (above 600px) */
@media (min-width: 601px) and (max-width: 800px) {
    .aqua-book-appt .nextpatient-provider-image-cell,
    .nextpatient-provider-table .nextpatient-provider-image-cell {
        max-height: 200px !important;
        flex-shrink: 0;
        background-size: cover !important;
        background-position: center center !important;
    }
}

/* Timeslots stay 2-column on mobile - consistent with sidebar behavior */
/* No mobile breakpoint needed - grid maintains 2-column layout */

/* Provider content cell */
.aqua-book-appt .nextpatient-provider-provider-cell,
.nextpatient-provider-table .nextpatient-provider-provider-cell {
    flex: 1;
    padding: 24px 28px;
    padding-left: 8px;
}

/* Provider name block */
.aqua-book-appt .nextpatient-provider-name-block,
.nextpatient-provider-table .nextpatient-provider-name-block {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.aqua-book-appt .nextpatient-provider-name-block-left {
    display: none;
}

.aqua-book-appt .nextpatient-provider-name-block-right {
    flex: 1;
}

/* Provider name */
.aqua-book-appt .nextpatient-provider-name,
.nextpatient-provider-table .nextpatient-provider-name {
    font-size: 1.3em;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    line-height: 1.3;
    text-align: left;
    font-size: 22px;
    line-height: 25px;
}

/* Provider details */
.aqua-book-appt .nextpatient-provider-address,
.nextpatient-provider-table .nextpatient-provider-address {
    color: #6c757d;
    font-size: 0.95em;
    line-height: 1.4;
    margin-bottom: 6px;
    text-align: left;
    font-size: 15px;
    line-height: 20px;
}

.aqua-book-appt .nextpatient-provider-address em {
    color: #0057af;
    font-weight: 600;
    font-style: normal;
}

.aqua-book-appt .nextpatient-provider-age-range,
.nextpatient-provider-table .nextpatient-provider-age-range {
    color: #6c757d;
    font-size: 0.9em;
    margin-bottom: 6px;
    text-align: left;
    font-size: 15px;
    line-height: 20px;
    margin-top: 5px;
    margin-bottom: 7px;
    font-style: italic;
}

/* Provider blurb/bio link */
.aqua-book-appt .nextpatient-provider-blurb,
.nextpatient-provider-table .nextpatient-provider-blurb {
    margin-bottom: 4px;
    text-align: left;
    font-size: 16px;
    line-height: 20px;
    margin: 5px 0;
}

.aqua-book-appt .nextpatient-provider-blurb a,
.nextpatient-provider-table .nextpatient-profile-url {
    color: #0057af;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 500;
}

.aqua-book-appt .nextpatient-provider-blurb a:hover {
    text-decoration: underline;
}

/* Next appointment preview */
.nextpatient-provider-table .next-appt-block {
    margin: 12px 0 5px;
}

.nextpatient-provider-table .next-appt-block .time-line {
    font-size: 18px;
}

.nextpatient-provider-table .next-appt-block .explanation {
    font-size: 15px;
    line-height: 22px;
}

.nextpatient-provider-table .call-no-times {
    margin: 12px 0 5px;
    font-size: 17px;
}

/* CALL TO SCHEDULE STYLING */
.aqua-book-appt .call-no-times {
    color: #6c757d;
    font-style: italic;
    text-align: center;
    background: #f8f9fa;
    padding: 18px;
    border-radius: 4px;
    margin-top: 4px;
}

.aqua-book-appt .call-no-times a {
    color: #0057af;
    text-decoration: none;
    font-weight: 600;
}

.aqua-book-appt .call-no-times a:hover {
    text-decoration: underline;
}

/* ============================================================================
   5. TIMESLOT BUTTONS
   ========================================================================= */

/* Provider times container - Standardized grid layout across all widget types */
.nextpatient-provider-times,
.aqua-book-appt .nextpatient-provider-times,
.nextpatient-provider-table .nextpatient-provider-times,
#nextpatient-widget\.2978 .nextpatient-provider-times,
[id^="nextpatient-widget"] .nextpatient-provider-times {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 4px;
    text-align: left;
    padding: 5px 0;
}

/* Handle time preview box - single column */
.nextpatient-provider-times:has(.time-preview-box),
.aqua-book-appt .nextpatient-provider-times:has(.time-preview-box),
.nextpatient-provider-table .nextpatient-provider-times:has(.time-preview-box),
#nextpatient-widget\.2978 .nextpatient-provider-times:has(.time-preview-box),
[id^="nextpatient-widget"] .nextpatient-provider-times:has(.time-preview-box) {
    grid-template-columns: 1fr;
}

/* Wrapper divs should not interfere with grid */
.nextpatient-provider-times > div,
.aqua-book-appt .nextpatient-provider-times > div,
.nextpatient-provider-table .nextpatient-provider-times > div,
#nextpatient-widget\.2978 .nextpatient-provider-times > div,
[id^="nextpatient-widget"] .nextpatient-provider-times > div {
    display: contents !important;
}

/* Base timeslot button */
.nextpatient-box a.nextpatient-slot-time,
.nextpatient-box a.nextpatient-slot-time:visited {
    color: #505050;
}

/* Base timeslot button - Standardized across all widget types */
.nextpatient-slot-time,
.aqua-book-appt .nextpatient-slot-time,
.nextpatient-provider-table .nextpatient-slot-time {
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    min-width: 100px;
    padding: 12px 16px !important;
    background: linear-gradient(135deg, #f1f1f1 0%, #e8e8e8 100%) !important;
    border: none !important;
    border-radius: 4px !important;
    color: #212223 !important;
    text-decoration: none !important;
    transition: all 0.2s !important;
    box-sizing: border-box !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
}

/* Hover state - Standardized across all widget types */
.nextpatient-slot-time:hover,
.aqua-book-appt .nextpatient-slot-time:hover,
.nextpatient-provider-table .nextpatient-slot-time:hover,
#nextpatient-widget\.2978 .nextpatient-slot-time:hover,
[id^="nextpatient-widget"] .nextpatient-slot-time:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #0057af 0%, #0066bb 100%) !important;
    color: white !important;
}

/* Timeslot text formatting - Standardized across all widget types */
.nextpatient-slot-time-day,
.aqua-book-appt .nextpatient-slot-time-day,
.nextpatient-provider-table .nextpatient-slot-time-day,
#nextpatient-widget\.2978 .nextpatient-slot-time-day,
[id^="nextpatient-widget"] .nextpatient-slot-time-day {
    font-size: 0.85em;
    font-weight: 500;
    margin-bottom: 2px;
    line-height: 1.3;
    display: block;
}

.nextpatient-slot-time-time,
.aqua-book-appt .nextpatient-slot-time-time,
.nextpatient-provider-table .nextpatient-slot-time-time,
#nextpatient-widget\.2978 .nextpatient-slot-time-time,
[id^="nextpatient-widget"] .nextpatient-slot-time-time {
    font-size: 1.1em;
    font-weight: 600;
    line-height: 1.3;
    display: block;
}

/* "More times" button - Standardized across all widget types */
/* Must be more specific than .nextpatient-slot-time to override gray background */
.nextpatient-slot-time.nextpatient-more-times,
.nextpatient-slot-time.nextpatient-slot-time-more,
.nextpatient-more-times,
.nextpatient-slot-time-more,
.aqua-book-appt .nextpatient-slot-time.nextpatient-more-times,
.aqua-book-appt .nextpatient-slot-time.nextpatient-slot-time-more,
.aqua-book-appt .nextpatient-slot-time-more,
.nextpatient-provider-table .nextpatient-slot-time.nextpatient-more-times,
.nextpatient-provider-table .nextpatient-more-times,
#nextpatient-widget\.2978 .nextpatient-slot-time.nextpatient-more-times,
#nextpatient-widget\.2978 .nextpatient-more-times,
[id^="nextpatient-widget"] .nextpatient-slot-time.nextpatient-more-times,
[id^="nextpatient-widget"] .nextpatient-more-times {
    font-style: italic !important;
    background: linear-gradient(135deg, #0057af 0%, #0066bb 100%) !important;
    color: white !important;
}

.nextpatient-slot-time.nextpatient-more-times:hover,
.nextpatient-slot-time.nextpatient-slot-time-more:hover,
.nextpatient-more-times:hover,
.nextpatient-slot-time-more:hover,
.aqua-book-appt .nextpatient-slot-time.nextpatient-more-times:hover,
.aqua-book-appt .nextpatient-slot-time.nextpatient-slot-time-more:hover,
.aqua-book-appt .nextpatient-slot-time-more:hover,
.nextpatient-provider-table .nextpatient-slot-time.nextpatient-more-times:hover,
.nextpatient-provider-table .nextpatient-more-times:hover,
#nextpatient-widget\.2978 .nextpatient-slot-time.nextpatient-more-times:hover,
#nextpatient-widget\.2978 .nextpatient-more-times:hover,
[id^="nextpatient-widget"] .nextpatient-slot-time.nextpatient-more-times:hover,
[id^="nextpatient-widget"] .nextpatient-more-times:hover {
    background: linear-gradient(135deg, #003d73 0%, #004d8a 100%) !important;
}

.nextpatient-provider-table .nextpatient-provider-more-times {
    text-align: left;
    margin-top: 5px;
}

/* SUBTLE ANIMATION */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.aqua-book-appt .nextpatient-provider {
    animation: fadeIn 0.3s ease forwards;
}

.aqua-book-appt .nextpatient-provider:nth-child(2) { animation-delay: 0.1s; }
.aqua-book-appt .nextpatient-provider:nth-child(3) { animation-delay: 0.2s; }
.aqua-book-appt .nextpatient-provider:nth-child(4) { animation-delay: 0.3s; }

/* ==========================================================================
   5. NEXTPATIENT WIDGETS - SIDEBAR
   ========================================================================== */

/* ============================================================================
   6. SIDEBAR LAYOUTS (PROVIDER PAGES)
   ========================================================================= */

.nextpatient-sidebar h3 {
    margin-bottom: 16px;
}

.nextpatient-sidebar #nextpatient-schedule {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nextpatient-sidebar.provider #nextpatient-schedule {
    margin-top: 16px;
}

/* Reason select dropdown */
.nextpatient-sidebar.provider .nextpatient-reason-select select,
.nextpatient-sidebar.provider select[name="reason_id"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 4px;
    font-size: 1em;
    background: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e") right 12px center / 16px no-repeat white;
    color: #333;
    transition: all 0.2s;
    appearance: none;
    cursor: pointer;
}

.nextpatient-sidebar.provider .nextpatient-reason-select select:hover,
.nextpatient-sidebar.provider select[name="reason_id"]:hover {
    border-color: #0057af;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.nextpatient-sidebar.provider .nextpatient-reason-select select:focus,
.nextpatient-sidebar.provider select[name="reason_id"]:focus {
    outline: none;
    border-color: #0057af;
    box-shadow: 0 0 0 3px rgba(0, 84, 154, 0.1);
}

/* Location cards in sidebar */
.nextpatient-sidebar.provider #nextpatient-schedule .nextpatient-provider-location {
    margin-bottom: 20px;
    border: 1px solid #e8ecef;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.2s;
    background: white;
    animation: fadeIn 0.3s ease forwards;
}

.nextpatient-sidebar.provider #nextpatient-schedule .nextpatient-provider-location:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border-color: #0057af;
}

.nextpatient-sidebar.provider #nextpatient-schedule .nextpatient-provider-location:nth-child(2) {
    animation-delay: 0.1s;
}

.nextpatient-sidebar.provider #nextpatient-schedule .nextpatient-provider-location:nth-child(3) {
    animation-delay: 0.2s;
}

.nextpatient-sidebar.provider #nextpatient-schedule .nextpatient-provider-location:nth-child(4) {
    animation-delay: 0.3s;
}

/* Location name and address */
.nextpatient-sidebar.provider #nextpatient-schedule .nextpatient-location-name {
    font-size: 1.3em;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 6px;
    padding: 18px 20px 0;
}

.nextpatient-sidebar.provider #nextpatient-schedule .nextpatient-location-address {
    color: #6c757d;
    font-size: 0.9em;
    line-height: 1.4;
    padding: 0 20px 16px;
    border-bottom: 1px solid #f0f2f4;
}

/* Times in sidebar */
.nextpatient-sidebar .nextpatient-provider-times {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 0;
}

.nextpatient-sidebar .nextpatient-provider-times:has(.time-preview-box) {
    grid-template-columns: 1fr;
}

.nextpatient-sidebar.provider #nextpatient-schedule .nextpatient-provider-times {
    padding: 18px 20px;
}

.nextpatient-sidebar.provider #nextpatient-schedule .nextpatient-provider-times:has(.nextpatient-no-time) {
    display: block;
    width: 100%;
}

.nextpatient-sidebar.provider #nextpatient-schedule .nextpatient-provider-times:not(:has(*)) {
    color: #6c757d;
    font-style: italic;
    text-align: left;
    background: #f8f9fa;
    padding: 16px;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
    display: block;
    margin: 0;
}

.nextpatient-sidebar.provider #nextpatient-schedule .nextpatient-provider-times:not(:has(*))::after {
    content: "Choose a visit reason above.";
}

.nextpatient-sidebar.provider #nextpatient-schedule .nextpatient-provider-location:has(.nextpatient-slot-time)::after {
    display: none !important;
}

/* Sidebar timeslot buttons */
.nextpatient-sidebar.provider #nextpatient-schedule .nextpatient-slot-time {
    transition: all 0.2s;
    font-weight: 500;
    cursor: pointer;
    opacity: 1;
    text-align: center;
    min-width: 100px;
    margin: 4px 4px 4px 0 !important;
    padding: 12px 16px !important;
    display: inline-block !important;
    background: linear-gradient(135deg, #f1f1f1 0%, #e8e8e8 100%) !important;
    border: none !important;
    border-radius: 4px !important;
    color: #212223 !important;
    text-decoration: none !important;
}

.nextpatient-sidebar.provider #nextpatient-schedule .nextpatient-slot-time:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #0057af 0%, #0066bb 100%) !important;
    color: white !important;
}

.nextpatient-sidebar.provider #nextpatient-schedule .nextpatient-slot-time-day {
    font-size: 0.85em;
    font-weight: 500;
    margin-bottom: 2px;
}

.nextpatient-sidebar.provider #nextpatient-schedule .nextpatient-slot-time-time {
    font-size: 1.1em;
    font-weight: 600;
}

/* Sidebar more times button */
.nextpatient-sidebar.provider #nextpatient-schedule .nextpatient-more-times {
    font-style: italic;
    background: linear-gradient(135deg, #0057af 0%, #0066bb 100%) !important;
    color: white !important;
}

.nextpatient-sidebar.provider #nextpatient-schedule .nextpatient-more-times:hover {
    background: linear-gradient(135deg, #003d73 0%, #004d8a 100%) !important;
}

/* No times message */
.nextpatient-sidebar.provider #nextpatient-schedule .nextpatient-no-time {
    color: #6c757d;
    font-style: italic;
    text-align: center;
    background: #f8f9fa;
    padding: 16px;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
    display: block;
    margin: 0;
}

.nextpatient-sidebar.provider #nextpatient-schedule .nextpatient-no-time a {
    color: #0057af;
    text-decoration: none;
    font-weight: 600;
}

.nextpatient-sidebar.provider #nextpatient-schedule .nextpatient-no-time a:hover {
    text-decoration: underline;
}

/* Time preview box */
.nextpatient-sidebar.provider #nextpatient-schedule .time-preview-box {
    color: #212223;
    text-decoration: none;
    font-weight: 500;
    cursor: default;
    opacity: 0.6;
    margin: 0 !important;
    padding: 16px !important;
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    background: linear-gradient(135deg, #f1f1f1 0%, #e8e8e8 100%) !important;
    border: none !important;
    border-radius: 4px !important;
    text-align: left !important;
}

.nextpatient-sidebar.provider #nextpatient-schedule .time-line {
    width: 100%;
    margin-bottom: 8px;
    text-align: left;
}

.nextpatient-sidebar.provider #nextpatient-schedule .time-line-label {
    letter-spacing: 0.5px;
    color: #333;
    font-size: 0.9em !important;
    text-transform: uppercase !important;
}

.nextpatient-sidebar.provider #nextpatient-schedule .time-line-time {
    color: #333;
    margin-left: 8px;
    font-size: 0.9em !important;
    font-weight: 600 !important;
}

.nextpatient-sidebar.provider #nextpatient-schedule .time-line-instructions {
    color: #555;
    width: 100%;
    display: block;
    font-size: 0.85em !important;
    line-height: 1.35 !important;
    text-align: left !important;
    margin: 0 !important;
}

.nextpatient-sidebar .time-line-instructions {
    text-align: left !important;
}

/* Sidebar timeslot links */
.nextpatient-sidebar .nextpatient-provider-times a {
    width: 100%;
    background: transparent;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(103, 110, 118, 0.08), 
                0 0 0 1px rgba(103, 110, 118, 0.16), 
                0 1px 1px rgba(0, 0, 0, 0.12);
    height: auto !important;
}

.nextpatient-sidebar .nextpatient-provider-times a:hover {
    border-color: #0057af;
}

/* Responsive design */
@media (max-width: 600px) {
    .nextpatient-sidebar.provider #nextpatient-schedule .nextpatient-location-name,
    .nextpatient-sidebar.provider #nextpatient-schedule .nextpatient-location-address,
    .nextpatient-sidebar.provider #nextpatient-schedule .nextpatient-provider-times {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .nextpatient-sidebar.provider #nextpatient-schedule .nextpatient-slot-time {
        display: block !important;
        margin-bottom: 8px !important;
        text-align: center;
    }
}

/* Providers Single Page */
.single-provider .tmb-shadowed-lg.tmb-shadowed.tmb-no-bg.tmb > .t-inside .t-entry-visual {
	border-radius: 12px !important;
}

/* ==========================================================================
   6. PROVIDER GRID RESPONSIVE OVERRIDES
   ========================================================================== */

/* Base styles - Mobile first: 1 column */
.fwpl-layout.el-ptvr9j {
  grid-template-columns: 1fr !important;
  grid-gap: 16px !important;
}

/* Tablet: 2 columns above 767px */
@media (min-width: 768px) {
  .fwpl-layout.el-ptvr9j {
    grid-template-columns: repeat(2, 1fr) !important;
    grid-gap: 20px !important;
  }
}

/* Tablet Large: 3 columns above 959px */
@media (min-width: 960px) {
  .fwpl-layout.el-ptvr9j {
    grid-template-columns: repeat(3, 1fr) !important;
    grid-gap: 24px !important;
  }
}

/* Desktop: 4 columns above 1200px */
@media (min-width: 1200px) {
  .fwpl-layout.el-ptvr9j {
    grid-template-columns: repeat(3, 1fr) !important;
    grid-gap: 36px !important;
  }
}

.fwpl-item.view-more {
  align-self: start;
  margin-top: 16px;
  display: block;
}

.fwpl-item.book {
  align-self: start;
}

.fwpl-item.book a {
    border-radius: 4px;
    margin-top: 8px;
    display: block;
}

.fwpl-item.view-more .fwpl-btn::after {
    content: "\f054"; 
    font-family: "uncodeicon";
    font-weight: 900;
    margin-left: 8px;
    font-size: 0.8em;
}

.provider-facets .facetwp-facet {
    margin-bottom: 10px;
}

.fwpl-item.service-types .fwpl-term {
    font-size: 12px;
}

/* Hide services beyond the first 3 */
.fwpl-item.service-types .fwpl-term:nth-child(n+4) {
    display: none;
}

/* ==========================================================================
   7. PROVIDER SPECIALTIES & CERTIFICATIONS
   ========================================================================== */

.provider-cert {
    margin-top: 12px !important;
}

.provider-specialties {
    background: #f1f1f1 !important;
    padding: 16px;
    border-radius: 4px;
    margin: 20px 0;
}

.provider-specialties strong {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
}

.provider-specialties ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    max-width: 100%;
    gap: 8px;
}

/* For smaller screens, allow fewer columns */
@media (max-width: 768px) {
    .provider-specialties ul {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

@media (max-width: 480px) {
    .provider-specialties ul {
        grid-template-columns: 1fr;
    }
}

.provider-specialties li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 5px;
    line-height: 1.4;
}

/* Blue circle bullet with white checkmark */
.provider-specialties li::before {
    content: "\f00c"; /* Font Awesome checkmark unicode */
    font-family: "uncodeicon";
    position: absolute;
    left: 0;
    top: 0;
    width: 20px;
    height: 20px;
    background-color: #0057af; /* Updated blue color */
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: normal;
    line-height: 1;
}

#row-unique-1 .provider-specialties a,
#row-unique-1 > div > div > div > div > div > div > div > div > div > div > div.wpb_column.pos-middle.pos-center.align_left.column_child.col-lg-8.single-internal-gutter > div > div > div > div > div:nth-child(3) > div > p > a {
  display: inline-block !important;
  background-color: #0057af !important;
  color: white !important;
  font-size: 14px !important;
  padding: 8px 16px !important;
  border-radius: 2px !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  pointer-events: none !important;
}

.provider-specialties a:hover {
  background-color: #003d7a;
  transition: background-color 0.2s ease;
}

/* ==========================================================================
   8. MOBILE BOOK APPOINTMENT
   ========================================================================== */

/* Hide mobile book appointment button by default */
.book-appt.mobile {
  display: none;
}

/* Show mobile book appointment button only on mobile (below 959px) */
@media (max-width: 959px) {
  .book-appt.mobile {
    display: block;
  }
}

/* Add scroll offset for sticky nav - no visual spacing added */
#book-appointment {
  scroll-margin-top: 64px;
}

/* ==========================================================================
   9. MENU & NAVIGATION
   ========================================================================== */

.static-map {
    margin-top: 0px !important;
}

.menu-section-css {
    padding-left: 0px !important;
}

.menu-section-css li {
    margin: 12px 0px 0px 0px;
    border-bottom: 1px solid rgba(50, 49, 48, 0.2);
    list-style: none;
}

.menu-section-css li a {
    font-size: 22px;
    line-height: 1.3;
    text-transform: capitalize;
    font-weight: 400;
    display: block;
    padding: 0px 0px 5px 0px;
}

#menu-locations-menu li.menu-item a:hover {
	color: #000 !important;
}

.menu-section-css li a::before {
    font-family: "uncodeicon";
    content: "\f105";
    margin-right: 9px;
    margin-top: 3px;
    float: right;
    font-weight: 900;
}

.div-left {
    width: 100%;
    max-width: 66.66666666666666%;
    display: inline-block;
    float: left;
    box-sizing: border-box;
}

.div-right {
    width: 100%;
    max-width: 33.33333333333333%;
    display: inline-block;
    float: left;
    box-sizing: border-box;
    padding-left: 72px;
}

.sp-css {
    font-size: 28px;
}

@media screen and (max-width: 959px) {
    .div-left {
        width: 100%;
        max-width: 100%;
        display: block;
        float: left;
        box-sizing: border-box;
        padding-bottom: 25px;
    }
    
    .div-right {
        width: 100%;
        max-width: 100%;
        display: block;
        float: left;
        box-sizing: border-box;
        padding-left: 0px;
    }
    
    .sp-css {
        font-size: 25px;
    }
    
    .menu-section-css {
        padding-left: 0px !important;
    }
}

/* ==========================================================================
   10. MARQUEE ANIMATION
   ========================================================================== */

.marquee-parent {
    width: 101% !important;
}

.sdg-marquee .banner {
    font-style: italic !important;
    position: relative;
    overflow: hidden;
    font-family: "larken", sans-serif;
    font-style: normal;
    font-size: 30px;
    font-weight: 300 !important;
    line-height: 50px;
    min-width: 200vw;
    animation: bannermove 40s linear infinite;
    display: flex;
    justify-content: space-between;
    padding-right: 10px !important;
}

@keyframes bannermove {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.sdg-marquee .banner div {
  padding: 0px 24px;
  white-space: nowrap;
}

@media only screen and (max-width:959px) {
    .sdg-marquee .banner {
        animation: bannermove 10s linear infinite;
    }
}

/* ==========================================================================
   11. COUNTERS & LAYOUT
   ========================================================================== */

@media only screen and (max-width:959px) {
    .counters__row .row-inner {
        display: flex;
    }
    .counters__block {
        width: 50%;
    }    
}

@media only screen and (max-width:640px) {
    .counters__row .row-inner {
        display: flex;
        flex-direction: column;
    }
    
    .counters__block {
        width: 100%;
    }
    
    .counters__block .uncell {
        padding: 24px !important;
    }
    
    .counters__block--third .uncell {
        border-bottom: 1px solid #dddddd ;
    }
}

/* ==========================================================================
   12. LOCATIONS
   ========================================================================== */

.locations-loop__filter {
    margin-top: 0px !important;
}

.locations-loop__post-grid a {
    color: #fff;
    display: block;
    padding: 24px 16px !important;
    background: #0a2547;
    transition: all 0.3s ease;
    border: 1px solid #0a2547;
}

.locations-loop__post-grid a:hover {
    background: transparent; 
    color: #0a2547;
}

.locations-loop__filter .facetwp-facet {
    margin-bottom: 0px;
}

@media only screen and (max-width: 959px) {
    .locations-loop__post-grid .fwpl-layout {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media only screen and (max-width: 540px) {
    .locations-loop__post-grid .fwpl-layout {
        grid-template-columns: repeat(1, 1fr) !important;
    }
}

/* ==========================================================================
   13. NEXTPATIENT WIDGET ADDITIONAL STYLES
   ========================================================================== */

/* ============================================================================
   8. LEGACY FALLBACK STYLES
   ========================================================================= */

/* These maintain compatibility with older inline NextPatient styles */
.nextpatient-criteria-container {
    display: flex !important; /* Override inline display: block */
}

.nextpatient-criteria-box {
    display: flex !important; /* Override inline display: inline-block */
}

/* Ensure consistent box-sizing */
.nextpatient-criteria-box *,
.nextpatient-provider *,
.nextpatient-sidebar * {
    box-sizing: border-box;
}

/* ==========================================================================
   14. INSURANCE & FINANCIAL
   ========================================================================== */

.insurance-financial-post-grid .t-inside {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.insurance-financial-post-grid .t-inside .half-block-padding {
    padding: 30px 16px;
}

/* ==========================================================================
   15. UTILITY CLASSES
   ========================================================================== */

.training-title {
    display: block;
}