/* Enbarezept Public Facing Styles */

/* Modern Filter Containers */
.enbarezept-checkbox-filter-container,
.enbarezept-custom-filter-container,
.enbarezept-search-filter-container,
.enbarezept-price-filter-widget {
    margin: 12px 0;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.enbarezept-checkbox-filter-container:hover,
.enbarezept-custom-filter-container:hover,
.enbarezept-search-filter-container:hover,
.enbarezept-price-filter-widget:hover {
    border-color: #299d8f;
    box-shadow: 0 2px 8px rgba(41, 157, 143, 0.08);
}

/* Filter Labels */
.enbarezept-checkbox-label,
.enbarezept-filter-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 16px 0;
    cursor: pointer;
    transition: color 0.2s ease;
}

/* Sort Filter Label - Separate class for individual control */
.enbarezept-sort-filter-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 16px 0;
    cursor: pointer;
    transition: color 0.2s ease;
}

/* Hide sort filter label when needed */
.enbarezept-sort-filter-label.hidden {
    display: none !important;
}

/* Out-of-stock product button styling - Override general button styles */
.enbarezept-out-of-stock-product {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    background: #f3f4f6 !important;
    color: #6b7280 !important;
    border-color: #d1d5db !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
}

.enbarezept-out-of-stock-product:hover {
    opacity: 0.7 !important;
    background: #e5e7eb !important;
    transform: none !important;
    box-shadow: none !important;
    color: #6b7280 !important;
    border-color: #d1d5db !important;
}

.enbarezept-out-of-stock-product:active {
    transform: none !important;
    box-shadow: none !important;
}

.enbarezept-checkbox-label {
    margin-bottom: 0;
}

/* Checkbox Styling */
.enbarezept-checkbox-filter {
    width: 20px !important;
    height: 20px !important;
    margin: 0 !important;
    cursor: pointer;
    accent-color: #299d8f;
    padding: 0 !important;
    border-radius: 4px !important;
    background-color: transparent !important;
    background-image: none !important;
    background-repeat: unset !important;
    background-position: unset !important;
    padding-right: 0 !important;
    -webkit-appearance: checkbox !important;
    -moz-appearance: checkbox !important;
    appearance: checkbox !important;
    border: 2px solid #d1d5db !important;
    transition: all 0.2s ease;
}

.enbarezept-checkbox-filter:hover {
    border-color: #299d8f !important;
}

.enbarezept-checkbox-text {
    user-select: none;
    transition: all 0.2s ease;
}

/* Custom Dropdown Styling */
.enbarezept-custom-dropdown {
    position: relative;
    width: 100%;
}

.enbarezept-dropdown-selected {
    padding: 12px 16px;
    background: #f9fafb;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 400;
    color: #374151;
    transition: all 0.2s ease;
    position: relative;
    min-height: 20px;
}

.enbarezept-dropdown-selected:after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #6b7280;
    transition: all 0.2s ease;
}

/* Ensure search input wrapper doesn't inherit dropdown arrow */
.enbarezept-search-input-wrapper .enbarezept-search-input:after,
.enbarezept-search-filter-container:after,
.enbarezept-search-filter-container .enbarezept-search-input-wrapper:after {
    display: none !important;
    content: none !important;
}

/* Completely override any dropdown styling for search inputs */
.enbarezept-search-input-wrapper,
.enbarezept-search-input-wrapper *,
.enbarezept-search-filter-container .enbarezept-search-input-wrapper,
.enbarezept-search-filter-container .enbarezept-search-input-wrapper * {
    background-image: none !important;
}

.enbarezept-search-input-wrapper:before,
.enbarezept-search-input-wrapper:after,
.enbarezept-search-input-wrapper *:before,
.enbarezept-search-input-wrapper *:after {
    display: none !important;
    content: none !important;
}

.enbarezept-dropdown-selected:hover {
    background: #ffffff;
    border-color: #299d8f;
}

.enbarezept-dropdown-options.open + .enbarezept-dropdown-selected:after,
.enbarezept-dropdown-options.open ~ .enbarezept-dropdown-selected:after {
    transform: translateY(-50%) rotate(180deg);
}

.enbarezept-dropdown-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.enbarezept-dropdown-options.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.enbarezept-dropdown-option {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
    transition: all 0.15s ease;
    border-bottom: 1px solid #f3f4f6;
}

.enbarezept-dropdown-option:last-child {
    border-bottom: none;
}

.enbarezept-dropdown-option:hover {
    background: #f3f4f6;
    color: #299d8f;
}

.enbarezept-dropdown-option.selected {
    background: #ecfdf5;
    color: #299d8f;
    font-weight: 500;
}

.enbarezept-dropdown-option.selected:before {
    content: '✓';
    margin-right: 8px;
    color: #299d8f;
}

/* WooCommerce Price Filter Widget Specific Styling */
.enbarezept-price-filter-widget .widgettitle {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 16px 0;
    padding: 0;
}

.enbarezept-price-filter-widget .price_slider_wrapper {
    margin: 0;
    position: relative;
}

.enbarezept-price-filter-widget .price_slider {
    height: 6px;
    background: #f3f4f6;
    border: none;
    border-radius: 3px;
    margin: 20px 0;
    position: relative;
    overflow: visible;
}

.enbarezept-price-filter-widget .ui-slider-range {
    background: linear-gradient(90deg, #299d8f 0%, #22877a 100%);
    border: none;
    border-radius: 3px;
    height: 100%;
    position: absolute;
    top: 0;
    transition: all 0.2s ease;
}

.enbarezept-price-filter-widget .ui-slider-handle {
    width: 18px;
    height: 18px;
    background: #ffffff;
    border: 2px solid #299d8f;
    border-radius: 50%;
    cursor: grab;
    outline: none;
    position: absolute;
    top: -6px;
    margin-left: -9px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.enbarezept-price-filter-widget .ui-slider-handle:hover,
.enbarezept-price-filter-widget .ui-slider-handle:focus {
    background: #299d8f;
    border-color: #22877a;
    box-shadow: 0 4px 8px rgba(41, 157, 143, 0.2);
    transform: scale(1.1);
}

.enbarezept-price-filter-widget .ui-slider-handle:active {
    cursor: grabbing;
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(41, 157, 143, 0.3);
}

.enbarezept-price-filter-widget .ui-slider-handle.ui-state-focus {
    outline: 2px solid rgba(41, 157, 143, 0.3);
    outline-offset: 2px;
}

.enbarezept-price-filter-widget .price_slider_amount {
    margin-top: 16px;
}

.enbarezept-price-filter-widget .price_label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    text-align: center;
    padding: 8px 0;
    background: #f9fafb;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
}

.enbarezept-price-filter-widget .price_label .from,
.enbarezept-price-filter-widget .price_label .to {
    font-weight: 600;
    color: #299d8f;
}

.enbarezept-price-filter-widget .clear {
    clear: both;
}

/* Loading state for price slider */
.enbarezept-price-filter-widget.loading .price_slider {
    opacity: 0.6;
    pointer-events: none;
}

.enbarezept-price-filter-widget.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #299d8f;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Search Filter Specific Styling */
.enbarezept-search-filter-container .enbarezept-filter-label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 12px 0;
}

.enbarezept-search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.enbarezept-search-input-wrapper:after {
    display: none !important;
}

.enbarezept-search-input {
    width: 100%;
    padding: 12px 45px 12px 16px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    color: #374151 !important;
    background: #ffffff !important;
    transition: all 0.2s ease !important;
    outline: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
}

.enbarezept-search-input:after {
    display: none !important;
}

/* Override generic filter styles for search input specifically */
.enbarezept-search-filter-container .enbarezept-search-input.enbarezept-generic-filter {
    padding: 12px 45px 12px 16px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    background: #ffffff !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
}

.enbarezept-search-filter-container .enbarezept-search-input.enbarezept-generic-filter:after,
.enbarezept-search-filter-container .enbarezept-search-input.enbarezept-generic-filter::after {
    display: none !important;
    content: none !important;
}

.enbarezept-search-input:focus {
    border-color: #299d8f;
    box-shadow: 0 0 0 3px rgba(41, 157, 143, 0.1);
}

.enbarezept-search-input::placeholder {
    color: #9ca3af;
}

.enbarezept-search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    pointer-events: none;
    z-index: 1;
}

.enbarezept-search-clear {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    color: #6b7280;
    transition: all 0.2s ease;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.enbarezept-search-clear:hover {
    background: #f3f4f6;
    color: #374151;
}

.enbarezept-search-clear-icon {
    font-size: 16px;
    line-height: 1;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .enbarezept-checkbox-filter-container,
    .enbarezept-custom-filter-container,
    .enbarezept-search-filter-container,
    .enbarezept-price-filter-widget {
        padding: 16px;
        margin: 10px 0;
    }
    
    .enbarezept-price-filter-widget .widgettitle {
        font-size: 15px;
        margin-bottom: 12px;
    }
    
    .enbarezept-price-filter-widget .price_slider {
        margin: 16px 0;
    }
    
    .enbarezept-price-filter-widget .ui-slider-handle {
        width: 20px;
        height: 20px;
        top: -7px;
        margin-left: -10px;
    }
    
    .enbarezept-search-filter-container .enbarezept-filter-label {
        font-size: 15px;
        margin-bottom: 10px;
    }
    
    .enbarezept-search-input {
        padding: 10px 40px 10px 14px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

@media (max-width: 480px) {
    .enbarezept-price-filter-widget {
        padding: 12px;
        margin: 8px 0;
    }
    
    .enbarezept-price-filter-widget .widgettitle {
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    .enbarezept-price-filter-widget .price_label {
        font-size: 13px;
    }
}

/* Checkbox Mobile Responsive */
@media (max-width: 768px) {
    .enbarezept-checkbox-filter-container {
        margin: 10px 0;
        padding: 12px;
    }
    
    .enbarezept-checkbox-label {
        font-size: 14px;
        gap: 10px;
    }
    
    .enbarezept-checkbox-filter {
        width: 20px !important;
        height: 20px !important;
    }
}

@media (max-width: 480px) {
    .enbarezept-checkbox-filter-container {
        margin: 8px 0;
        padding: 10px;
    }
    
    .enbarezept-checkbox-label {
        font-size: 13px;
        gap: 8px;
    }
    
    .enbarezept-checkbox-filter {
        width: 18px !important;
        height: 18px !important;
    }
}

/* General Button Styling */
#enbarezept-open-filter-modal,
#enbarezept-open-product-pharmacy-modal,
.enbarezept-add-to-prescription-ajax,
.enbarezept-add-to-prescription-product,
.enbarezept-out-of-stock-product {
    --bde-button-primary-border-color: transparent;
    --bde-button-primary-border-color-hover: transparent;
    --bde-button-primary-text-color: #fff;
    --bde-button-primary-text-color-hover: #fff;
    --bde-button-primary-background-color: var(--bde-palette-color-1, #299d8f);
    --bde-button-primary-background-color-hover: var(--bde-palette-color-3, #22877a);

    background: linear-gradient(135deg, #299d8f 0%, #22877a 100%);
    color: var(--bde-button-primary-text-color);
    border: 1px solid var(--bde-button-primary-border-color);
    border-radius: 12px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(41, 157, 143, 0.2);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

#enbarezept-open-filter-modal:hover,
#enbarezept-open-product-pharmacy-modal:hover,
.enbarezept-add-to-prescription-ajax:hover,
.enbarezept-add-to-prescription-product:hover {
    background: linear-gradient(135deg, #22877a 0%, #1e7066 100%);
    color: var(--bde-button-primary-text-color-hover);
    border-color: var(--bde-button-primary-border-color-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(41, 157, 143, 0.3);
}

#enbarezept-open-filter-modal:active,
#enbarezept-open-product-pharmacy-modal:active,
.enbarezept-add-to-prescription-ajax:active,
.enbarezept-add-to-prescription-product:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(41, 157, 143, 0.2);
}

/* New Modal Styling */
/* Generic Filter Dropdown Styles */
.enbarezept-generic-filter-container {
    margin: 15px 0;
    padding: 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid #e9ecef;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 100%;
    overflow: hidden;
}

.enbarezept-generic-filter-container:hover {
    border-color: #299d8f;
    box-shadow: 0 4px 16px rgba(41, 157, 143, 0.15);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.enbarezept-generic-filter-container label {
    font-weight: 600;
    font-size: 13px;
    color: #495057;
    margin: 0;
    transition: all 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.enbarezept-generic-filter-container:hover label {
    color: #299d8f;
}

.enbarezept-generic-filter {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background-color: #ffffff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #495057;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2214%22%20height%3D%2214%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%3E%3Cpath%20d%3D%22M2%205l5%205%205-5z%22%20fill%3D%22%23299d8f%22%20stroke%3D%22%23299d8f%22%20stroke-width%3D%221%22/%3E%3C/svg%3E');
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 32px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    min-height: 40px;
    box-sizing: border-box;
}

.enbarezept-generic-filter:hover {
    border-color: #299d8f;
    background-color: #f8f9fa;
    box-shadow: 0 4px 8px rgba(41, 157, 143, 0.1);
    transform: translateY(-1px);
}

.enbarezept-generic-filter:focus {
    outline: none;
    border-color: #299d8f;
    box-shadow: 0 0 0 3px rgba(41, 157, 143, 0.2);
    background-color: #ffffff;
}

/* Modern Option Styling */
.enbarezept-generic-filter option {
    padding: 8px 12px;
    background-color: #ffffff;
    color: #495057;
    font-size: 13px;
    font-weight: 500;
    border: none;
    margin: 2px 0;
}

.enbarezept-generic-filter option:hover,
.enbarezept-generic-filter option:focus {
    background-color: #299d8f;
    color: #ffffff;
}

.enbarezept-generic-filter option:checked {
    background-color: #299d8f;
    color: #ffffff;
    font-weight: 600;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .enbarezept-generic-filter-container {
        margin: 10px 0;
        padding: 10px;
    }
    
    .enbarezept-generic-filter-container label {
        font-size: 12px;
    }
    
    .enbarezept-generic-filter {
        font-size: 12px;
        padding: 8px 10px;
        padding-right: 28px;
        min-height: 36px;
    }
    
    .enbarezept-generic-filter option {
        font-size: 12px;
        padding: 6px 10px;
    }
}

@media (max-width: 480px) {
    .enbarezept-generic-filter-container {
        margin: 8px 0;
        padding: 8px;
    }
    
    .enbarezept-generic-filter {
        font-size: 11px;
        padding: 6px 8px;
        padding-right: 24px;
        min-height: 32px;
    }
}

/* Modern Modal Styling */
.enbarezept-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
    z-index: 999999 !important;
    pointer-events: auto !important;
}

.enbarezept-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #ffffff 0%, #f8fdfc 100%);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 90%;
    width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease-out;
    pointer-events: auto !important;
    z-index: 1000000 !important;
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to { 
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.enbarezept-modal-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.enbarezept-modal-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
}

.enbarezept-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6c757d;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.enbarezept-modal-close:hover {
    background-color: #f8f9fa;
    color: #495057;
    transform: scale(1.1);
}

.enbarezept-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex-grow: 1;
}

.pharmacy-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.btn-check {
    display: none;
}

/* Delivery tiles styling for pharmacy selection */
.delivery-item {
    margin-bottom: 12px;
    pointer-events: auto !important;
    z-index: 1000001 !important;
    position: relative;
}

.delivery-tile-label {
    display: block !important;
    cursor: pointer !important;
    transition: all 0.3s ease;
    pointer-events: auto !important;
    position: relative;
    z-index: 1000002 !important;
    border-radius: 12px;
    padding: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 8px;
}

/* Force modal styling with highest specificity */
#enbarezept-filter-modal .delivery-item .delivery-tile-label,
#enbarezept-filter-modal .delivery-item label.delivery-tile-label {
    display: block !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    padding: 16px !important;
    margin-bottom: 12px !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
}

#enbarezept-filter-modal .delivery-item .delivery-tile-label:hover,
#enbarezept-filter-modal .delivery-item label.delivery-tile-label:hover {
    border-color: #299d8f !important;
    box-shadow: 0 4px 16px rgba(41, 157, 143, 0.2) !important;
    transform: translateY(-2px) !important;
}

#enbarezept-filter-modal .delivery-item input[type="radio"]:checked + .delivery-tile-label,
#enbarezept-filter-modal .delivery-item input[type="radio"]:checked + label.delivery-tile-label {
    border-color: #299d8f !important;
    background: linear-gradient(135deg, #f0fffe 0%, #e6f7f5 100%) !important;
    box-shadow: 0 4px 16px rgba(41, 157, 143, 0.3) !important;
}

/* Hide radio buttons */
#enbarezept-filter-modal .delivery-item input[type="radio"] {
    display: none !important;
}

.delivery-tile {
    pointer-events: auto !important;
    z-index: 1000003 !important;
    position: relative;
}

.delivery-tile-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: #111827;
    margin-bottom: 8px;
}

.delivery-tile-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.delivery-tile-main {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.delivery-tile-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.delivery-tile-logo img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

/* Shortcode container styling */
.enbarezept-product-shortcode-container {
    max-width: 600px;
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
}

.enbarezept-product-shortcode-container h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.enbarezept-pharmacy-selection-container,
.enbarezept-shortcode-quantity-wrapper,
.enbarezept-shortcode-button-container {
    margin-bottom: 25px;
}

.enbarezept-shortcode-button-container {
    margin-bottom: 0;
}

/* Shortcode quantity selector styling */
.enbarezept-shortcode-quantity-input-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.enbarezept-shortcode-qty-input {
    width: 100px;
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    text-align: center;
    transition: border-color 0.3s ease;
}

.enbarezept-shortcode-qty-input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 1px rgba(0, 124, 186, 0.2);
}

.quantity-unit-text {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.enbarezept-shortcode-quantity-info {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #666;
}

.enbarezept-shortcode-quantity-info span {
    padding: 2px 6px;
    background: #f5f5f5;
    border-radius: 3px;
}

/* Shortcode modal styling */
#enbarezept-shortcode-modal .delivery-item {
    margin-bottom: 15px;
    width: 100%;
    box-sizing: border-box;
}

/* SHORTCODE MODAL STYLES - HIGHEST SPECIFICITY TO OVERRIDE BREAKDANCE */
body #enbarezept-shortcode-modal .delivery-item {
    margin-bottom: 15px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

body #enbarezept-shortcode-modal .delivery-tile {
    position: relative !important;
}

body #enbarezept-shortcode-modal .delivery-tile-label {
    display: block !important;
    width: 100% !important;
    cursor: pointer !important;
    padding: 16px !important;
    margin-bottom: 12px !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
}

body #enbarezept-shortcode-modal .delivery-tile-label:hover {
    border-color: #299d8f !important;
    box-shadow: 0 4px 16px rgba(41, 157, 143, 0.2) !important;
    transform: translateY(-2px) !important;
}

body #enbarezept-shortcode-modal .enbarezept-shortcode-pharmacy-radio:checked + .delivery-tile-label {
    border-color: #299d8f !important;
    background: linear-gradient(135deg, #f0fffe 0%, #e6f7f5 100%) !important;
    box-shadow: 0 4px 16px rgba(41, 157, 143, 0.3) !important;
}

body #enbarezept-shortcode-modal .enbarezept-shortcode-pharmacy-radio {
    display: none !important;
}

body #enbarezept-shortcode-modal .delivery-tile-name {
    font-weight: 600 !important;
    font-size: 1.1rem !important;
    color: #111827 !important;
    margin-bottom: 8px !important;
}

#enbarezept-shortcode-modal .delivery-tile-content {
    display: flex !important;
    justify-content: space-between !important;
align-items: center !important;
    align-items: center !important;
}

#enbarezept-shortcode-modal .delivery-tile-main {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    flex: 1 !important;
}

#enbarezept-shortcode-modal .delivery-tile-logo {
    width: 40px !important;
    height: 40px !important;
    border-radius: 8px !important;
    background: #f3f4f6 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

#enbarezept-shortcode-modal .delivery-tile-logo img {
    width: 32px !important;
    height: 32px !important;
    object-fit: contain !important;
}

#enbarezept-shortcode-modal .delivery-address-lines {
    font-size: 14px !important;
    color: #666 !important;
}

#enbarezept-shortcode-modal .delivery-tile-badges {
    display: flex !important;
    gap: 5px !important;
    margin: 5px 0 !important;
}

#enbarezept-shortcode-modal .delivery-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

#enbarezept-shortcode-modal .pickup-badge {
    background: #dcfce7;
    color: #166534;
}

#enbarezept-shortcode-modal .shipping-badge {
    background: #dbeafe;
    color: #1e40af;
}

#enbarezept-shortcode-modal .delivery-tile-price {
    text-align: right !important;
    flex-shrink: 0 !important;
}

#enbarezept-shortcode-modal .price-amount {
    font-weight: 600;
}

#enbarezept-shortcode-modal .delivery-tile-price .stock-status {
    font-size: 0.9rem !important;
    color: #10b981 !important;
    font-weight: 500 !important;
}

.delivery-address-lines {
    color: #6b7280;
    font-size: 0.9rem;
}

.delivery-tile-badges {
    display: flex;
    gap: 6px;
    margin: 8px 0;
}

.delivery-badge {
    background: #299d8f;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.delivery-tile-price {
    text-align: right;
    flex-shrink: 0;
}

.price-amount {
    font-weight: 600;
    font-size: 1.1rem;
    color: #299d8f;
    display: block;
}

.stock-status {
    font-size: 0.8rem;
    color: #059669;
    display: block;
    margin-top: 2px;
}

.delivery-tile-label:hover {
    border-color: #299d8f;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(41, 157, 143, 0.15);
}

.btn-check:checked + .delivery-tile-label {
    border-color: #299d8f;
    background: linear-gradient(135deg, #f0fdfc 0%, #e6fffa 100%);
    box-shadow: 0 8px 25px rgba(41, 157, 143, 0.2);
    transform: translateY(-2px);
}

.btn-check:checked + .delivery-tile-label::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #299d8f 0%, #22877a 100%);
}

.delivery-tile {
    position: relative;
}

.delivery-tile-name {
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 16px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.delivery-tile-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.delivery-tile-main {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.delivery-tile-logo {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #299d8f;
    flex-shrink: 0;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.delivery-tile-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
}

.btn-check:checked + .delivery-tile-label .delivery-tile-logo {
    border-color: #299d8f;
    background: linear-gradient(135deg, #299d8f 0%, #22877a 100%);
    color: white;
}

.delivery-address-lines {
    font-size: 14px;
    color: #6c757d;
    line-height: 1.4;
    flex-grow: 1;
}

.delivery-tile-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.delivery-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.delivery-badge.pickup-badge {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.delivery-badge.shipping-badge {
    background: linear-gradient(135deg, #007bff 0%, #6610f2 100%);
}

.delivery-tile-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #e9ecef;
    margin-top: 8px;
}

.price-amount {
    font-size: 18px;
    font-weight: 700;
    color: #299d8f;
}

.stock-status {
    font-size: 12px;
    color: #28a745;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stock-status::before {
    content: '✓';
    background: #28a745;
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
}

.delivery-tile-badges .badge.pickup {
    background-color: #198754; /* Green */
}

.delivery-tile-badges .badge.shipping {
    background-color: #0d6efd; /* Blue */
}

.delivery-tile-footer {
    font-size: 0.9rem;
}

.stock-available {
    color: #198754; /* Green */
}

.stock-available .fa-solid {
    margin-right: 0.3rem;
}

/* Modern Quantity selector styles for shop page and product pages */
.enbarezept-shop-quantity-wrapper,
.enbarezept-product-quantity-wrapper {
    margin: 15px 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.enbarezept-shop-quantity-input-container,
.enbarezept-product-quantity-input-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.enbarezept-shop-qty-input,
.enbarezept-product-qty-input {
    background-color: #ffffff !important;
    padding: 12px 8px !important;
    color: #299d8f !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    border: 2px solid #c0e2de !important;
    border-radius: 12px !important;
    width: 75px !important;
    text-align: center !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 4px rgba(192, 226, 222, 0.3) !important;
    outline: none !important;
}

.enbarezept-shop-qty-input:hover,
.enbarezept-product-qty-input:hover {
    border-color: #299d8f !important;
    box-shadow: 0 4px 8px rgba(41, 157, 143, 0.2) !important;
    transform: translateY(-1px) !important;
}

.enbarezept-shop-qty-input:focus,
.enbarezept-product-qty-input:focus {
    border-color: #299d8f !important;
    box-shadow: 0 0 0 3px rgba(41, 157, 143, 0.1), 0 4px 8px rgba(41, 157, 143, 0.2) !important;
    transform: translateY(-1px) !important;
}

/* Product page quantity input styling - override Breakdance with high specificity */
body.single-product .quantity,
.single-product .woocommerce div.product form.cart .quantity,
.single-product .cart .quantity,
.woocommerce .single-product .quantity {
    margin: 15px 0 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
}

.single-product .quantity .qty-label,
.single-product .quantity label {
    display: none !important;
}

body.single-product .quantity input.qty,
.single-product .woocommerce div.product form.cart .quantity input.qty,
.single-product .cart .quantity input.qty,
.woocommerce .single-product .quantity input.qty,
body.single-product input[type="number"].qty {
    background-color: #ffffff !important;
    padding: 12px 8px !important;
    color: #299d8f !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    border: 2px solid #c0e2de !important;
    border-radius: 12px !important;
    width: 75px !important;
    min-width: 75px !important;
    max-width: 75px !important;
    text-align: center !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 4px rgba(192, 226, 222, 0.3) !important;
    outline: none !important;
    margin: 0 !important;
    height: auto !important;
    line-height: normal !important;
}

body.single-product .quantity input.qty:hover,
.single-product .woocommerce div.product form.cart .quantity input.qty:hover,
body.single-product input[type="number"].qty:hover {
    border-color: #299d8f !important;
    box-shadow: 0 4px 8px rgba(41, 157, 143, 0.2) !important;
    transform: translateY(-1px) !important;
}

body.single-product .quantity input.qty:focus,
.single-product .woocommerce div.product form.cart .quantity input.qty:focus,
body.single-product input[type="number"].qty:focus {
    border-color: #299d8f !important;
    box-shadow: 0 0 0 3px rgba(41, 157, 143, 0.1), 0 4px 8px rgba(41, 157, 143, 0.2) !important;
    transform: translateY(-1px) !important;
}

.quantity-unit-text {
    color: #299d8f !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    margin-left: 2px !important;
}

.enbarezept-quantity-info {
    font-size: 11px !important;
    font-weight: 500 !important;
    margin-top: 4px !important;
    display: flex !important;
    gap: 10px !important;
}

.enbarezept-min-stock {
    color: #666 !important;
}

.enbarezept-max-stock {
    color: #e74c3c !important;
}

.enbarezept-step-info {
    color: #299d8f !important;
}

/* Pharmacy Selection Container Styling */
.enbarezept-pharmacy-selection-container {
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8fdfc 0%, #e6fffa 100%);
    border: 2px solid #c0e2de;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(41, 157, 143, 0.1);
    position: relative;
    overflow: hidden;
}

.enbarezept-pharmacy-selection-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #299d8f 0%, #22877a 100%);
}

.enbarezept-pharmacy-selection-container h3 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.enbarezept-pharmacy-selection-container h3::before {
    content: '🏥';
    font-size: 18px;
}

/* Hide default WooCommerce quantity input for prescription products */
.enbarezept-hidden-quantity,
.quantity.enbarezept-hidden-quantity,
.single-product .quantity.enbarezept-hidden-quantity {
    display: none !important;
}

/* Hide Breakdance quantity buttons and styling for prescription products */
.single-product .quantity--number .bde-quantity-button,
.single-product .quantity--number.enbarezept-hidden-quantity .bde-quantity-button {
    display: none !important;
}

/* ===== SHORTCODE STYLES ===== */

/* Container styling */
.enbarezept-product-shortcode-container {
    margin: 5px 0 !important;
    padding: 5px !important;
    border-radius: 16px !important;
}

/* Two Column Layout */
.enbarezept-shortcode-two-column-layout {
    display: flex !important;
    gap: 15px !important;
    align-items: flex-start !important;
    margin-bottom: 15px !important;
}

.enbarezept-shortcode-left-column {
    flex: 1 !important;
}

.enbarezept-shortcode-right-column {
    flex: 1 !important;
}

/* Responsive design for mobile */
@media (max-width: 768px) {
    .enbarezept-shortcode-two-column-layout {
        flex-direction: column !important;
        gap: 10px !important;
    }
}

/* Pharmacy selection button - Higher specificity */
.enbarezept-product-shortcode-container #enbarezept-shortcode-open-modal,
div.enbarezept-product-shortcode-container #enbarezept-shortcode-open-modal,
body #enbarezept-shortcode-open-modal {
    width: 100% !important;
    padding: 15px 20px !important;
    background: linear-gradient(135deg, #eaf5f4 0%, #ebf6f5 100%) !important;
    border: none !important;
    border-radius: 8px !important;
    color: #299d8f !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 8px rgba(41, 157, 143, 0.3) !important;
}

.enbarezept-product-shortcode-container #enbarezept-shortcode-open-modal:hover,
div.enbarezept-product-shortcode-container #enbarezept-shortcode-open-modal:hover,
body #enbarezept-shortcode-open-modal:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(41, 157, 143, 0.4) !important;
    background: linear-gradient(135deg, #d1f2ee 0%, #e0f7f4 100%) !important;
}

/* Shortcode quantity selector styling - Compact version */
.enbarezept-shortcode-quantity-input-container {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin-bottom: 8px !important;
    justify-content: center !important;
}

.enbarezept-shortcode-qty-input {
    width: 80px !important;
    padding: 8px 12px !important;
    border: 2px solid #d1d5db !important;
    border-radius: 6px !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    text-align: center !important;
    background: #ffffff !important;
    color: #374151 !important;
    transition: all 0.3s ease !important;
}

.enbarezept-shortcode-qty-input:focus {
    outline: none !important;
    border-color: #299d8f !important;
    box-shadow: 0 0 0 2px rgba(41, 157, 143, 0.1) !important;
}

.enbarezept-shortcode-quantity-wrapper .quantity-unit-text {
    font-size: 12px !important;
    color: #6b7280 !important;
    font-weight: 500 !important;
}

.enbarezept-shortcode-quantity-info {
    display: flex !important;
    gap: 10px !important;
    justify-content: center !important;
    margin-bottom: 10px !important;
    font-size: 11px !important;
    color: #6b7280 !important;
}

.enbarezept-min-stock,
.enbarezept-step-stock {
    padding: 3px 8px !important;
    background: #f3f4f6 !important;
    border-radius: 12px !important;
    font-weight: 500 !important;
}

/* Prescription button styling */
.enbarezept-shortcode-add-prescription {
    width: 100% !important;
    padding: 18px 24px !important;
    background: linear-gradient(135deg, #0a3e34 0%, #10695f 100%) !important;
    border: none !important;
    border-radius: 12px !important;
    color: white !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 16px rgba(10, 62, 52, 0.3) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.enbarezept-shortcode-add-prescription:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 25px rgba(16, 105, 95, 0.5) !important;
    background: linear-gradient(135deg, #0d4a3e 0%, #14776a 100%) !important;
}

/* ===== SELECTED PHARMACY DISPLAY ===== */

/* Selected Pharmacy Info Box */
.enbarezept-selected-pharmacy-display {
    background: linear-gradient(135deg, #f8fffe 0%, #f0fdfb 100%) !important;
    border: 2px solid #d1f2ee !important;
    border-radius: 12px !important;
    padding: 20px !important;
    margin-bottom: 20px !important;
    box-shadow: 0 4px 12px rgba(41, 157, 143, 0.1) !important;
}

.selected-pharmacy-info {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 12px !important;
    margin-bottom: 15px !important;
    text-align: center !important;
}

.selected-pharmacy-logo {
    width: 50px !important;
    height: 50px !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #ffffff !important;
    border: 1px solid #e0f2f1 !important;
    flex-shrink: 0 !important;
}

.selected-pharmacy-logo img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.selected-pharmacy-logo i {
    font-size: 24px !important;
    color: #299d8f !important;
}

.selected-pharmacy-details {
    width: 100% !important;
}

.selected-pharmacy-name {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #1a5a52 !important;
    margin-bottom: 5px !important;
    line-height: 1.3 !important;
}

.selected-pharmacy-address {
    font-size: 14px !important;
    color: #4a7c7a !important;
    margin-bottom: 8px !important;
    line-height: 1.4 !important;
}

.selected-pharmacy-badges {
    display: flex !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
}

.selected-pharmacy-badges .badge {
    padding: 4px 8px !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
}

.selected-pharmacy-badges .badge.pickup {
    background: #e8f5e8 !important;
    color: #2e7d32 !important;
}

.selected-pharmacy-badges .badge.shipping {
    background: #e3f2fd !important;
    color: #1976d2 !important;
}

.selected-pharmacy-change-container {
    text-align: center !important;
}

.change-pharmacy-btn {
    background: linear-gradient(135deg, #299d8f 0%, #26897c 100%) !important;
    color: white !important;
    border: none !important;
    padding: 10px 20px !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.change-pharmacy-btn:hover {
    background: linear-gradient(135deg, #26897c 0%, #22766a 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 8px rgba(41, 157, 143, 0.3) !important;
}

.change-pharmacy-btn i {
    font-size: 12px !important;
}

/* Pharmacy Price Display */
.enbarezept-pharmacy-price {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #299d8f !important;
    margin: 8px 0 !important;
}

/* Hide WooCommerce price when pharmacy price is shown */
.woocommerce ul.products li.product .price {
    display: none !important;
}

/* Select Pharmacy Button Styles */
.select-pharmacy-btn {
    background: linear-gradient(135deg, #299d8f 0%, #26897c 100%) !important;
    color: white !important;
    border: none !important;
    padding: 15px 25px !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    width: 100% !important;
    box-shadow: 0 2px 8px rgba(41, 157, 143, 0.2) !important;
}

.select-pharmacy-btn:hover {
    background: linear-gradient(135deg, #26897c 0%, #22766a 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(41, 157, 143, 0.4) !important;
}

.select-pharmacy-btn i {
    font-size: 18px !important;
}

/* Mobile responsive for selected pharmacy */
@media (max-width: 768px) {
    .selected-pharmacy-info {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
        padding: 12px !important;
    }
    
    .selected-pharmacy-logo {
        align-self: center !important;
    }
    
    .selected-pharmacy-details {
        text-align: center !important;
        width: 100% !important;
    }
    
    .change-pharmacy-btn {
        align-self: center !important;
        width: 100% !important;
        justify-content: center !important;
    }
}

/* ===== MODAL POSITIONING FIX ===== */

/* Fix modal positioning for shortcode modal only - Optimized for performance */
#enbarezept-shortcode-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 999999 !important;
    display: none !important;
    background: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: none !important;
    pointer-events: auto !important;
}

/* Product page modal - preserve original behavior */
#enbarezept-product-pharmacy-modal {
    z-index: 999999 !important;
    background: rgba(0, 0, 0, 0.8) !important;
    backdrop-filter: blur(5px) !important;
}

/* Shop filter modal - optimized for performance */
.enbarezept-modal,
#enbarezept-filter-modal {
    position: fixed !important;
    z-index: 999999 !important;
    background: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: none !important;
    pointer-events: auto !important;
}

.enbarezept-modal.show,
#enbarezept-filter-modal.show,
#enbarezept-shortcode-modal.show {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Product page modal show state - preserve original behavior */
#enbarezept-product-pharmacy-modal.show {
    display: block !important;
}

/* Modal content positioning for shop and shortcode modals - Compact and fast */
.enbarezept-modal-content,
#enbarezept-filter-modal .enbarezept-modal-content,
#enbarezept-shortcode-modal .enbarezept-modal-content {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    margin: 0 auto !important;
    max-width: 85vw !important;
    max-height: 80vh !important;
    width: 100% !important;
    max-width: 500px !important;
    background: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2) !important;
    overflow-y: auto !important;
    pointer-events: auto !important;
    z-index: 1000000 !important;
}

/* Product page modal content - preserve original styling */
#enbarezept-product-pharmacy-modal .enbarezept-modal-content {
    background: #ffffff !important;
    border-radius: 20px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
    overflow-y: auto !important;
    pointer-events: auto !important;
    z-index: 1000000 !important;
}

/* Fix for pharmacy selection display - ensure checked state shows properly */
.enbarezept-modal-body .delivery-tile-label {
    position: relative !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 12px !important;
    padding: 16px !important;
    margin-bottom: 12px !important;
    background: #ffffff !important;
    transition: all 0.3s ease !important;
}

/* Ultra-specific selector for checked pharmacy radio buttons - this WILL work */
.enbarezept-modal-body .pharmacy-list .delivery-item input[type="radio"][name="filter_pharmacy_radio"]:checked + label.delivery-tile-label,
.enbarezept-modal-body .pharmacy-list .delivery-item input.btn-check[name="filter_pharmacy_radio"]:checked + label.delivery-tile-label,
.enbarezept-modal-body .pharmacy-list .delivery-item input[id^="pharmacy-"]:checked + label.delivery-tile-label,
.enbarezept-modal-body input[value="0"]:checked + label.delivery-tile-label[for="pharmacy-0"] {
    border: 3px solid #299d8f !important;
    background: linear-gradient(135deg, #f0fffe 0%, #e6f7f5 100%) !important;
    box-shadow: 0 4px 16px rgba(41, 157, 143, 0.3) !important;
    transform: translateY(-2px) !important;
}

/* En basit çözüm - tüm checked radio buttonları için */
input[type="radio"]:checked + label,
input[type="checkbox"]:checked + label,
input.btn-check:checked + label,
input:checked + .delivery-tile-label,
input:checked + label.delivery-tile-label {
    border: 3px solid #299d8f !important;
    background: #e6f7f5 !important;
    box-shadow: 0 2px 8px rgba(41, 157, 143, 0.2) !important;
}

/* Özel olarak pharmacy-0 için */
#pharmacy-0:checked + label[for="pharmacy-0"] {
    border: 4px solid #299d8f !important;
    background: #d1fae5 !important;
}

/* High specificity selectors for checked state - covers all possible radio button types */
.enbarezept-modal-body input[type="radio"]:checked + .delivery-tile-label,
.enbarezept-modal-body input.enbarezept-pharmacy-radio:checked + .delivery-tile-label,
.enbarezept-modal-body input[name="filter_pharmacy_radio"]:checked + .delivery-tile-label,
.enbarezept-modal-body input.btn-check:checked + .delivery-tile-label,
.enbarezept-modal-body .delivery-item input:checked + .delivery-tile-label,
.enbarezept-modal-body .delivery-item input[type="radio"]:checked + label.delivery-tile-label,
.enbarezept-modal-body .delivery-tile-label.selected-pharmacy-tile {
    border-color: #299d8f !important;
    background: linear-gradient(135deg, #f0fffe 0%, #e6f7f5 100%) !important;
    box-shadow: 0 4px 16px rgba(41, 157, 143, 0.3) !important;
    transform: translateY(-2px) !important;
}

.enbarezept-modal-body input[type="radio"]:checked + .delivery-tile-label::before,
.enbarezept-modal-body input.enbarezept-pharmacy-radio:checked + .delivery-tile-label::before,
.enbarezept-modal-body input[name="filter_pharmacy_radio"]:checked + .delivery-tile-label::before,
.enbarezept-modal-body input.btn-check:checked + .delivery-tile-label::before,
.enbarezept-modal-body .delivery-item input:checked + .delivery-tile-label::before,
.enbarezept-modal-body .delivery-item input[type="radio"]:checked + label.delivery-tile-label::before,
.enbarezept-modal-body .delivery-tile-label.selected-pharmacy-tile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(180deg, #299d8f 0%, #22877a 100%);
    border-radius: 8px 8px 0 0;
    z-index: 1;
}

/* Mobile responsive modal - optimized */
@media (max-width: 768px) {
    .enbarezept-modal-content,
    #enbarezept-filter-modal .enbarezept-modal-content,
    #enbarezept-shortcode-modal .enbarezept-modal-content,
    #enbarezept-product-pharmacy-modal .enbarezept-modal-content {
        max-width: 95vw !important;
        max-height: 90vh !important;
        margin: 8px !important;
        border-radius: 12px !important;
    }
    
    .enbarezept-modal-body {
        padding: 16px !important;
    }
    
    .delivery-tile-label {
        padding: 16px !important;
    }
    
    .delivery-tile-main {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 6px !important;
    }
    
    .delivery-tile-content {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 6px !important;
    }
    
    .delivery-tile-label {
        padding: 12px !important;
        margin-bottom: 8px !important;
    }
}
