/* Display Treatments Plugin Styles */

.dt-treatments-wrapper {
    max-width: 1200px;
    margin: 0;
    padding: 20px 0;
}

/* Search Wrapper */
.dt-search-wrapper {
    display: flex;
    align-items: stretch;
    max-width: 400px;
    margin-bottom: 24px;
    border-radius: 50px;
    background: #f5f5f5;
}

.dt-search-input,
.dt-search-input[type="text"] {
    flex: 1;
    display: flex;
    align-items: center;
    height: auto !important;
    min-height: 52px;
    padding: 14px 20px 14px 28px !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    font-size: 15px !important;
    line-height: 1.4 !important;
    min-width: 0;
    background: transparent !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.dt-search-input:focus,
.dt-search-input[type="text"]:focus {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.dt-search-button {
    flex-shrink: 0;
    padding: 14px 28px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    background: #333;
    color: #fff;
    border-radius: 50px;
    margin: 6px;
    transition: background 0.2s ease;
}

.dt-search-button:hover {
    background: #555;
}

/* Filter Row */
.dt-filter-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 32px;
}

/* Category Tabs Container */
.dt-tabs-container {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    position: relative;
}

/* Fade indicator on right edge when scrollable - desktop only */
@media (hover: hover) and (pointer: fine) {
    .dt-tabs-container::after {
        content: '';
        position: absolute;
        right: 44px;
        top: 0;
        bottom: 0;
        width: 30px;
        background: linear-gradient(to right, transparent, #fff);
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.2s ease;
        z-index: 1;
    }

    .dt-tabs-container.dt-has-overflow::after {
        opacity: 1;
    }
}

/* Scroll Buttons */
.dt-scroll-btn {
    flex-shrink: 0;
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: #f0f0f0;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dt-scroll-btn.dt-visible {
    display: flex;
}

.dt-scroll-btn:hover {
    background: #e0e0e0;
}

.dt-scroll-btn:active {
    transform: scale(0.95);
}

.dt-scroll-btn svg {
    width: 20px;
    height: 20px;
}

/* Category Tabs */
.dt-tabs-wrapper {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 4px 0;
}

.dt-tabs-wrapper::-webkit-scrollbar {
    display: none;
}

/* Desktop: drag to scroll */
@media (hover: hover) and (pointer: fine) {
    .dt-tabs-wrapper {
        cursor: grab;
        user-select: none;
        -webkit-user-select: none;
    }

    .dt-tabs-wrapper.dt-dragging {
        cursor: grabbing;
        scroll-behavior: auto;
    }

    .dt-tabs-wrapper:not(.dt-dragging) {
        scroll-behavior: smooth;
    }
}

/* Per Page Dropdown */
.dt-per-page-wrapper {
    flex-shrink: 0;
}

.dt-per-page-select,
select.dt-per-page-select {
    padding: 12px 40px 12px 24px !important;
    border: none !important;
    border-radius: 50px !important;
    background: #f0f0f0 !important;
    font-size: 15px !important;
    cursor: pointer;
    appearance: none !important;
    -webkit-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8L1 3h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 16px center !important;
    transition: all 0.2s ease;
    color: inherit;
    outline: none !important;
    box-shadow: none !important;
}

.dt-per-page-select:hover,
select.dt-per-page-select:hover {
    opacity: 0.85;
}

.dt-per-page-select:focus,
select.dt-per-page-select:focus {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

.dt-tab {
    display: inline-block;
    flex-shrink: 0;
    padding: 12px 24px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 15px;
    text-decoration: none;
    color: inherit;
    background: #f0f0f0;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.dt-tab:hover {
    opacity: 0.85;
    text-decoration: none;
    color: inherit;
}

.dt-tab-active {
    background: #333;
    color: #fff;
}

.dt-tab-active:hover {
    color: #fff;
}

/* Treatments Grid */
.dt-treatments-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 25px;
}

/* Treatment Card */
.dt-treatment-card {
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dt-treatment-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dt-treatment-card.dt-hidden {
    display: none;
}

/* Treatment Image */
.dt-treatment-image {
    position: relative;
    width: 100% !important;
    height: 200px !important;
    min-height: 200px !important;
    max-height: 200px !important;
    overflow: hidden !important;
    background: #f0f0f0;
}

.dt-treatment-image a {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
}

.dt-treatment-image img,
.dt-thumbnail,
img.dt-thumbnail {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 200px !important;
    max-height: 200px !important;
    object-fit: cover !important;
    transition: transform 0.3s ease;
}

.dt-treatment-card:hover .dt-thumbnail {
    transform: scale(1.05);
}

/* Treatment Content */
.dt-treatment-content {
    padding: 12px;
    text-align: left !important;
}

/* Center title when no image */
.dt-treatment-card--no-image .dt-treatment-content {
    text-align: center !important;
}

.dt-treatment-card--no-image .dt-treatment-title,
.dt-treatment-card--no-image .dt-treatment-title a {
    text-align: center !important;
}

.dt-treatment-title {
    display: block;
    font-size: 15px;
    line-height: 1.4;
    text-align: left !important;
}

.dt-treatment-title a {
    text-decoration: none;
    color: inherit;
    display: block;
    text-align: left !important;
}

.dt-treatment-title a:hover {
    text-decoration: underline;
}

/* No Results */
.dt-no-treatments,
.dt-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 20px;
}

/* Pagination */
.dt-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 48px;
    padding: 20px 0;
}

.dt-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s ease;
    color: inherit;
    background: #f5f5f5;
}

.dt-page-link:hover {
    background: #e5e5e5;
    text-decoration: none;
}

.dt-page-current {
    background: #333;
    color: #fff;
}

.dt-page-current:hover {
    background: #333;
}

.dt-page-prev,
.dt-page-next {
    font-size: 18px;
}

.dt-page-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    color: #999;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Responsive */
@media (max-width: 1024px) {
    .dt-treatments-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .dt-treatments-wrapper {
        padding: 16px 0;
    }

    .dt-search-wrapper {
        max-width: 100%;
    }

    .dt-search-input {
        padding: 12px 16px;
    }

    .dt-search-button {
        padding: 12px 20px;
    }

    .dt-filter-row {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 24px;
    }

    .dt-per-page-wrapper {
        align-self: flex-start;
    }

    .dt-tabs-wrapper {
        gap: 8px;
    }

    .dt-tab {
        padding: 10px 18px;
        font-size: 14px;
    }

    .dt-scroll-btn {
        width: 32px;
        height: 32px;
    }

    .dt-scroll-btn svg {
        width: 16px;
        height: 16px;
    }

    .dt-tabs-container {
        gap: 6px;
        width: 100%;
        max-width: 100%;
    }

    .dt-tabs-wrapper {
        min-width: 0;
        flex: 1;
    }

    .dt-treatments-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .dt-treatment-content {
        padding: 10px;
    }

    .dt-treatment-title {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .dt-treatments-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .dt-treatment-content {
        padding: 8px;
    }

    .dt-pagination {
        gap: 4px;
        margin-top: 32px;
    }

    .dt-page-link {
        min-width: 40px;
        height: 40px;
        padding: 0 12px;
        font-size: 14px;
    }
}
