/**
 * Regiofy EDD Frontend Styles
 * Modern, minimalist design inspired by Apple.com
 * Supports both product page selector and checkout summary
 */

/* ==========================================================================
   DESIGN SYSTEM - CSS VARIABLES
   ========================================================================== */

:root {
    /* Colors - Monochromatic with single accent */
    --regiofy-text-primary: #1d1d1f;
    --regiofy-text-secondary: #6e6e73;
    --regiofy-text-tertiary: #86868b;
    --regiofy-border: #d2d2d7;
    --regiofy-border-light: #e8e8ed;
    --regiofy-bg-subtle: #fbfbfd;
    --regiofy-bg-hover: #f5f5f7;
    --regiofy-accent: #0071e3;
    --regiofy-accent-hover: #0077ed;
    --regiofy-success: #34c759;
    --regiofy-error: #ff3b30;

    /* Typography */
    --regiofy-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;

    /* Spacing */
    --regiofy-space-xs: 4px;
    --regiofy-space-sm: 8px;
    --regiofy-space-md: 16px;
    --regiofy-space-lg: 24px;
    --regiofy-space-xl: 32px;
    --regiofy-space-2xl: 48px;

    /* Border radius */
    --regiofy-radius-sm: 8px;
    --regiofy-radius-md: 12px;
    --regiofy-radius-lg: 16px;
    --regiofy-radius-full: 980px;
}

/* ==========================================================================
   PRODUCT PAGE SELECTOR
   ========================================================================== */

.regiofy-product-selector {
    background: transparent;
    border: none;
    padding: var(--regiofy-space-lg) 0;
    margin: var(--regiofy-space-lg) 0;
    border-radius: 0;
    font-family: var(--regiofy-font);
}

.regiofy-product-selector h3 {
    font-size: 21px;
    font-weight: 600;
    color: var(--regiofy-text-primary);
    margin: 0 0 var(--regiofy-space-sm) 0;
    padding: 0;
    letter-spacing: -0.01em;
}

.regiofy-product-selector .regiofy-label {
    font-weight: 500;
    display: block;
    margin-bottom: var(--regiofy-space-sm);
    color: var(--regiofy-text-primary);
    font-size: 14px;
}

.regiofy-product-selector .regiofy-required {
    color: var(--regiofy-error);
    padding-left: 2px;
}

.regiofy-product-selector .regiofy-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--regiofy-border);
    border-radius: var(--regiofy-radius-sm);
    font-size: 17px;
    box-sizing: border-box;
    font-family: var(--regiofy-font);
    color: var(--regiofy-text-primary);
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.regiofy-product-selector .regiofy-input:focus {
    outline: none;
    border-color: var(--regiofy-accent);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
}

.regiofy-product-selector .regiofy-input::placeholder {
    color: var(--regiofy-text-tertiary);
}

/* Primary Button - Dark/Black like Apple */
.regiofy-product-selector .regiofy-button {
    background: var(--regiofy-text-primary);
    color: #fff;
    border: none;
    padding: 14px 28px;
    border-radius: var(--regiofy-radius-full);
    cursor: pointer;
    font-size: 17px;
    font-weight: 400;
    font-family: var(--regiofy-font);
    transition: background-color 0.2s, transform 0.1s;
}

.regiofy-product-selector .regiofy-button:hover {
    background: #000;
}

.regiofy-product-selector .regiofy-button:active {
    transform: scale(0.98);
}

/* Secondary Button - Ghost style */
.regiofy-product-selector .regiofy-button-secondary {
    background: transparent;
    color: var(--regiofy-accent);
    border: none;
    padding: 8px 16px;
    border-radius: var(--regiofy-radius-full);
    cursor: pointer;
    font-size: 14px;
    font-weight: 400;
    font-family: var(--regiofy-font);
    transition: background-color 0.2s;
}

.regiofy-product-selector .regiofy-button-secondary:hover {
    background: var(--regiofy-bg-hover);
}

/* Product Page Selected Business - Subtle confirmation */
.regiofy-product-selector .regiofy-selected-business {
    background: var(--regiofy-bg-subtle);
    border: 1px solid var(--regiofy-border-light);
    padding: var(--regiofy-space-md) var(--regiofy-space-lg);
    border-radius: var(--regiofy-radius-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--regiofy-space-md);
}

.regiofy-product-selector .regiofy-selected-info {
    flex: 1;
}

.regiofy-product-selector .regiofy-selected-info strong {
    display: block;
    font-size: 17px;
    color: var(--regiofy-text-primary);
    font-weight: 600;
    margin-bottom: 2px;
}

.regiofy-product-selector .regiofy-selected-info span {
    display: block;
    color: var(--regiofy-text-secondary);
    font-size: 14px;
}

/* Product Page Validation Error - Subtle inline */
.regiofy-validation-error {
    background: transparent;
    border: none;
    color: var(--regiofy-error);
    padding: var(--regiofy-space-sm) 0;
    border-radius: 0;
    margin-top: var(--regiofy-space-md);
    font-size: 14px;
    font-family: var(--regiofy-font);
}

/* Disabled Add-to-Cart Button (until business is selected) */
.edd-add-to-cart.regiofy-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Variant Section on Product Page */
#regiofy-variant-section {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

/* ==========================================================================
   CHECKOUT SUMMARY (Read-only)
   ========================================================================== */

.regiofy-checkout-summary-fieldset {
    background: #f9f9f9;
    border: 1px solid #ddd;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 5px;
}

.regiofy-checkout-summary-fieldset legend {
    font-size: 18px;
    font-weight: bold;
    padding: 0 10px;
    color: #333;
}

.regiofy-checkout-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
}

.regiofy-checkout-item:last-child {
    margin-bottom: 0;
}

.regiofy-checkout-item-product {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.regiofy-checkout-item-details strong {
    display: block;
    font-size: 16px;
    color: var(--regiofy-text-primary);
    margin-bottom: 4px;
}

.regiofy-checkout-item-details span {
    display: block;
    color: #555;
    font-size: 14px;
}

.regiofy-checkout-item-details .regiofy-checkout-variant {
    margin-top: 8px;
    font-size: 13px;
    color: #666;
}

.regiofy-checkout-error {
    background: #ffebee;
    border: 1px solid #ef5350;
    color: #c62828;
    padding: 15px;
    border-radius: 4px;
}

.regiofy-checkout-error p {
    margin: 0;
}

/* ==========================================================================
   LEGACY: Checkout Fieldset (kept for backwards compatibility)
   ========================================================================== */

#regiofy_business_info_fieldset {
    background: #f9f9f9;
    border: 1px solid #ddd;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 5px;
}

#regiofy_business_info_fieldset legend {
    font-size: 18px;
    font-weight: bold;
    padding: 0 10px;
    color: #333;
}

.regiofy-description {
    color: var(--regiofy-text-secondary);
    font-size: 15px;
    margin-bottom: var(--regiofy-space-lg);
    font-family: var(--regiofy-font);
    line-height: 1.5;
}

/* Search Wrapper - Clean input with dark button */
.regiofy-search-wrapper {
    display: flex;
    gap: var(--regiofy-space-sm);
    margin-top: var(--regiofy-space-sm);
}

.regiofy-search-wrapper input[type="text"] {
    flex: 1;
    padding: 14px 16px;
    border: 1px solid var(--regiofy-border);
    border-radius: var(--regiofy-radius-sm);
    font-size: 17px;
    font-family: var(--regiofy-font);
    color: var(--regiofy-text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.regiofy-search-wrapper input[type="text"]:focus {
    outline: none;
    border-color: var(--regiofy-accent);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
}

.regiofy-search-wrapper input[type="text"]::placeholder {
    color: var(--regiofy-text-tertiary);
}

.regiofy-search-wrapper button {
    padding: 14px 28px;
    white-space: nowrap;
    background: var(--regiofy-text-primary);
    color: #fff;
    border: none;
    border-radius: var(--regiofy-radius-full);
    font-size: 17px;
    font-weight: 400;
    font-family: var(--regiofy-font);
    cursor: pointer;
    transition: background-color 0.2s;
}

.regiofy-search-wrapper button:hover {
    background: #000;
}

/* Search Error (inline below search bar) */
.regiofy-search-error {
    color: #c62828;
    font-size: 13px;
    margin-top: 8px;
    padding: 8px 12px;
    background: #ffebee;
    border-left: 3px solid #ef5350;
    border-radius: 0 3px 3px 0;
}

/* Search Results */
#regiofy_search_results {
    margin-top: 15px;
}

.regiofy-results-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 3px;
    background: #fff;
}

.regiofy-result-item {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s;
}

.regiofy-result-item:last-child {
    border-bottom: none;
}

.regiofy-result-item:hover {
    background-color: #f0f0f0;
}

.regiofy-result-item strong {
    display: block;
    margin-bottom: 4px;
    color: #333;
}

.regiofy-result-item small {
    color: #666;
    font-size: 13px;
}

/* Selected Business Display - Subtle confirmation */
#regiofy_selected_business {
    background: var(--regiofy-bg-subtle);
    border: 1px solid var(--regiofy-border-light);
    padding: var(--regiofy-space-md) var(--regiofy-space-lg);
    border-radius: var(--regiofy-radius-md);
    margin-top: var(--regiofy-space-md);
}

#regiofy_selected_business strong {
    display: block;
    font-size: 17px;
    color: var(--regiofy-text-primary);
    margin-bottom: 4px;
}

#regiofy_selected_business span {
    display: block;
    color: var(--regiofy-text-secondary);
    margin-bottom: 10px;
}

#regiofy_change_selection {
    margin-top: 10px;
}

/* Status Messages */
.regiofy-searching,
.regiofy-no-results,
.regiofy-error {
    padding: 15px;
    text-align: center;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.regiofy-error {
    background: #ffebee;
    border-color: #f44336;
    color: #c62828;
}

.regiofy-no-results {
    background: #fff3e0;
    border-color: #ff9800;
    color: #e65100;
}

/* Responsive Design */
@media (max-width: 768px) {
    .regiofy-search-wrapper {
        flex-direction: column;
    }

    .regiofy-search-wrapper button {
        width: 100%;
    }
}

/* Integration with EDD styles */
.edd-cart #regiofy_business_info_fieldset {
    margin-top: 20px;
}

#edd_checkout_form_wrap #regiofy_business_info_fieldset .edd-label {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

#edd_checkout_form_wrap #regiofy_business_info_fieldset .edd-required-indicator {
    color: #f00;
    padding-left: 3px;
}

/* Variant Card Grid - Apple-like selection */
.regiofy-variant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--regiofy-space-md);
    margin-top: var(--regiofy-space-md);
}

.regiofy-variant-card {
    border: 1px solid var(--regiofy-border-light);
    border-radius: var(--regiofy-radius-md);
    padding: var(--regiofy-space-sm);
    cursor: pointer;
    text-align: center;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
}

.regiofy-variant-card:hover {
    border-color: var(--regiofy-border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.regiofy-variant-card.selected {
    border-color: var(--regiofy-text-primary);
    border-width: 2px;
    background: #fff;
}

.regiofy-variant-card img {
    width: 100%;
    aspect-ratio: 210 / 297; /* A4 portrait ratio */
    object-fit: contain;
    border-radius: var(--regiofy-radius-sm);
    display: block;
    background: var(--regiofy-bg-subtle);
}

.regiofy-variant-placeholder {
    width: 100%;
    aspect-ratio: 210 / 297; /* A4 portrait ratio */
    background: var(--regiofy-bg-subtle);
    border-radius: var(--regiofy-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--regiofy-text-tertiary);
}

.regiofy-variant-placeholder .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
}

.regiofy-variant-name {
    display: block;
    margin-top: var(--regiofy-space-sm);
    font-size: 12px;
    font-weight: 500;
    color: var(--regiofy-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: var(--regiofy-font);
}

/* Template Property Badges - Subtle, monochromatic */
.regiofy-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    margin-top: var(--regiofy-space-xs);
}

.regiofy-badge {
    display: inline-block;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.3;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-family: var(--regiofy-font);
}

/* All badges use same subtle gray style */
.regiofy-badge-size,
.regiofy-badge-formality,
.regiofy-badge-lang {
    background: var(--regiofy-bg-hover);
    color: var(--regiofy-text-secondary);
}

/* Responsive: Mobile 2 columns */
@media (max-width: 480px) {
    .regiofy-variant-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .regiofy-variant-card {
        padding: 6px;
    }

    .regiofy-variant-name {
        font-size: 12px;
        margin-top: 6px;
    }

    .regiofy-badges {
        gap: 3px;
        margin-top: 4px;
    }

    .regiofy-badge {
        padding: 1px 4px;
        font-size: 9px;
    }
}

/* Tablet: 3 columns */
@media (min-width: 481px) and (max-width: 768px) {
    .regiofy-variant-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Desktop: max 4 columns */
@media (min-width: 769px) {
    .regiofy-variant-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 150px));
    }
}

/* ==========================================================================
   FORM-BASED SERVICE UI (WhatsApp, Facebook, Instagram, etc.)
   ========================================================================== */

/* Service Form Container */
.regiofy-service-form {
    margin-top: 15px;
}

/* Form Field */
.regiofy-form-field {
    margin-bottom: 18px;
}

.regiofy-form-field:last-of-type {
    margin-bottom: 20px;
}

/* Form Field Labels */
.regiofy-form-field .regiofy-label {
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
    color: #333;
}

.regiofy-form-field .regiofy-required {
    color: #e53935;
    padding-left: 3px;
}

/* Form Inputs */
.regiofy-form-field .regiofy-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.regiofy-form-field .regiofy-input:focus {
    border-color: var(--regiofy-accent);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
    outline: none;
}

/* Textarea specific */
.regiofy-form-field textarea.regiofy-input {
    min-height: 80px;
    resize: vertical;
}

/* Field Error State */
.regiofy-form-field .regiofy-input.regiofy-field-error {
    border-color: #e53935;
    background-color: #fff8f8;
}

.regiofy-form-field .regiofy-input.regiofy-field-error:focus {
    box-shadow: 0 0 0 2px rgba(229, 57, 53, 0.15);
}

/* Field Description / Help Text */
.regiofy-field-description {
    margin-top: 6px;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

/* Form Actions (Confirm Button) - Dark pill style */
.regiofy-form-actions {
    margin-top: var(--regiofy-space-lg);
    padding-top: var(--regiofy-space-md);
    border-top: 1px solid var(--regiofy-border-light);
}

.regiofy-form-actions .regiofy-button {
    background: var(--regiofy-text-primary);
    color: #fff;
    border: none;
    padding: 14px 28px;
    border-radius: var(--regiofy-radius-full);
    cursor: pointer;
    font-size: 17px;
    font-weight: 400;
    font-family: var(--regiofy-font);
    transition: background-color 0.2s, transform 0.1s;
}

.regiofy-form-actions .regiofy-button:hover {
    background: #000;
}

.regiofy-form-actions .regiofy-button:active {
    transform: scale(0.98);
}

/* Confirmed Data Display - Subtle monochromatic */
.regiofy-confirmed-data {
    background: var(--regiofy-bg-subtle);
    border: 1px solid var(--regiofy-border-light);
    padding: var(--regiofy-space-md) var(--regiofy-space-lg);
    border-radius: var(--regiofy-radius-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--regiofy-space-md);
    margin-top: var(--regiofy-space-md);
}

.regiofy-confirmed-info {
    flex: 1;
    min-width: 0; /* Allow text truncation */
}

.regiofy-confirmed-info strong {
    display: block;
    font-size: 17px;
    color: var(--regiofy-text-primary);
    margin-bottom: 4px;
    font-family: var(--regiofy-font);
}

.regiofy-confirmed-info span {
    display: block;
    color: var(--regiofy-text-secondary);
    font-size: 14px;
    word-break: break-all;
}

/* Responsive Form Styles */
@media (max-width: 480px) {
    .regiofy-confirmed-data {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .regiofy-confirmed-data .regiofy-button-secondary {
        width: 100%;
        text-align: center;
    }

    .regiofy-form-actions .regiofy-button {
        width: 100%;
    }
}

/* ==========================================================================
   MULTI-LOCATION UI
   ========================================================================== */

/* Locations List Container */
.regiofy-locations-list {
    margin-top: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

/* Locations Header */
.regiofy-locations-header {
    background: #f5f5f5;
    padding: 12px 15px;
    border-bottom: 1px solid #e0e0e0;
}

.regiofy-locations-header strong {
    color: #333;
    font-size: 14px;
}

/* Locations Items Container */
.regiofy-locations-items {
    max-height: 300px;
    overflow-y: auto;
}

/* Individual Location Item */
.regiofy-location-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.15s;
}

.regiofy-location-item:last-child {
    border-bottom: none;
}

.regiofy-location-item:hover {
    background-color: #fafafa;
}

/* Location Info */
.regiofy-location-info {
    flex: 1;
    min-width: 0;
    padding-right: 10px;
}

.regiofy-location-name {
    display: block;
    font-weight: 600;
    color: #333;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.regiofy-location-detail {
    display: block;
    font-size: 12px;
    color: #666;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Remove Location Button */
.regiofy-remove-location {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    background: #f0f0f0;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s, color 0.15s;
    color: #999;
}

.regiofy-remove-location:hover {
    background: #e53935;
    color: #fff;
}

.regiofy-remove-location .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 16px;
}

/* Locations Actions (Add Another Button) */
.regiofy-locations-actions {
    padding: 12px 15px;
    background: #fafafa;
    border-top: 1px solid #e0e0e0;
}

/* Secondary Button Style (used for Add Another) - Blue accent */
.regiofy-button-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    color: var(--regiofy-accent);
    border: none;
    padding: 10px 18px;
    border-radius: var(--regiofy-radius-full);
    cursor: pointer;
    font-size: 14px;
    font-weight: 400;
    font-family: var(--regiofy-font);
    transition: background-color 0.2s, color 0.2s;
}

.regiofy-button-secondary:hover {
    background: var(--regiofy-bg-hover);
    color: var(--regiofy-accent-hover);
}

.regiofy-button-secondary .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    line-height: 18px;
}

/* Loading State for Add to Cart */
.edd-add-to-cart.edd-loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Regiofy button loading state - simple fade, no spinning */
.regiofy-adding {
    opacity: 0.7;
    pointer-events: none;
    cursor: wait !important;
}

/* Override any EDD theme animations on our buttons */
.regiofy-add-to-cart-btn,
.regiofy-add-to-cart-btn.regiofy-adding,
#regiofy_add_to_cart_now,
#regiofy_add_to_cart_now.regiofy-adding {
    animation: none !important;
    transform: none !important;
    transition: opacity 0.2s ease !important;
}

/* Hide EDD button when Regiofy selector is present (we use our own button) */
#regiofy_product_selector ~ .edd_download_purchase_form .edd-add-to-cart,
#regiofy_product_selector + .edd_download_purchase_form .edd-add-to-cart,
.regiofy-product-selector ~ .edd_download_purchase_form .edd-add-to-cart {
    display: none !important;
}

/* Responsive Multi-Location Styles */
@media (max-width: 480px) {
    .regiofy-locations-list {
        margin-top: 15px;
    }

    .regiofy-location-item {
        padding: 10px 12px;
    }

    .regiofy-locations-actions {
        padding: 10px 12px;
    }

    .regiofy-button-secondary {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================================================
   LOCATION THUMBNAIL & VARIANT INDICATOR
   ========================================================================== */

/* Location item with thumbnail - adjust layout */
.regiofy-location-item {
    align-items: flex-start;
}

/* Location thumbnail */
.regiofy-location-thumb {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    margin-right: 12px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    background: #f5f5f5;
}

.regiofy-location-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Variant indicator in location */
.regiofy-location-variant {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    font-size: 12px;
}

.regiofy-variant-label {
    color: #666;
}

/* Edit variant button */
.regiofy-edit-variant {
    padding: 2px 6px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #999;
    border-radius: 3px;
    transition: color 0.15s, background-color 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.regiofy-edit-variant:hover {
    color: var(--regiofy-accent);
    background: var(--regiofy-bg-hover);
}

.regiofy-edit-variant .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    line-height: 14px;
}

/* ==========================================================================
   VARIANT SELECTOR MODAL
   ========================================================================== */

/* Variant selector overlay */
.regiofy-variant-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

/* Variant selector modal */
.regiofy-variant-modal {
    background: #fff;
    border-radius: 8px;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: regiofy-modal-appear 0.2s ease-out;
}

@keyframes regiofy-modal-appear {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.regiofy-variant-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    background: #fafafa;
}

.regiofy-variant-modal-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.regiofy-modal-close {
    border: none;
    background: transparent;
    cursor: pointer;
    color: #999;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, background-color 0.15s;
}

.regiofy-modal-close:hover {
    color: #333;
    background: #e0e0e0;
}

.regiofy-modal-close .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    line-height: 20px;
}

.regiofy-variant-modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(80vh - 60px);
}

/* Modal variant grid - slightly smaller cards */
.regiofy-variant-modal-body .regiofy-variant-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
}

.regiofy-variant-modal-body .regiofy-variant-card {
    padding: 6px;
}

.regiofy-variant-modal-body .regiofy-variant-name {
    font-size: 12px;
    margin-top: 6px;
}

/* Responsive modal */
@media (max-width: 480px) {
    .regiofy-variant-overlay {
        padding: 10px;
    }

    .regiofy-variant-modal {
        max-height: 90vh;
    }

    .regiofy-variant-modal-body {
        max-height: calc(90vh - 60px);
        padding: 15px;
    }

    .regiofy-variant-modal-body .regiofy-variant-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Responsive: thumbnail hidden on very small screens if needed */
@media (max-width: 360px) {
    .regiofy-location-thumb {
        width: 40px;
        height: 40px;
        margin-right: 10px;
    }
}

/* ==========================================================================
   PRICE DISPLAY
   ========================================================================== */

/* Price per location item */
.regiofy-location-price {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--regiofy-text-primary);
    margin-top: 4px;
}

/* Total in locations footer */
.regiofy-locations-total {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
    text-align: right;
    font-size: 15px;
}

.regiofy-total-label {
    color: #666;
    font-weight: 500;
}

.regiofy-total-amount {
    color: #333;
    font-weight: 700;
    font-size: 17px;
}

/* Tax info in total */
.regiofy-total-tax {
    font-size: 12px;
    font-weight: normal;
    color: #666;
}

/* Price breakdown in main price area */
.regiofy-price-breakdown {
    font-size: 13px;
    font-weight: normal;
    color: #666;
    margin-left: 5px;
}

/* Responsive price styles */
@media (max-width: 480px) {
    .regiofy-locations-total {
        text-align: left;
    }
}

/* ==========================================================================
   2-STEP FLOW UI - Clean, no numbered steps
   ========================================================================== */

/* Step container */
.regiofy-step {
    margin-bottom: var(--regiofy-space-xl);
    padding-bottom: var(--regiofy-space-xl);
    border-bottom: 1px solid var(--regiofy-border-light);
}

.regiofy-step:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Step title - HIDE the number, just show text */
.regiofy-step-title {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: var(--regiofy-space-md);
    font-size: 21px;
    font-weight: 600;
    color: var(--regiofy-text-primary);
    font-family: var(--regiofy-font);
    letter-spacing: -0.01em;
}

/* HIDE the step number completely */
.regiofy-step-number {
    display: none !important;
}

/* Step check mark - subtle, matches monochromatic theme */
.regiofy-step-check {
    display: none;
    color: var(--regiofy-text-tertiary);
    margin-left: var(--regiofy-space-sm);
}

.regiofy-step-check .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.regiofy-step-complete .regiofy-step-check {
    display: inline-flex;
}

/* Disabled step state */
.regiofy-step-disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* Active step state */
.regiofy-step-active {
    opacity: 1;
    pointer-events: auto;
}

/* ==========================================================================
   PENDING SELECTION PANEL - Subtle confirmation
   ========================================================================== */

.regiofy-pending-selection {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--regiofy-bg-subtle);
    border: 1px solid var(--regiofy-border-light);
    border-radius: var(--regiofy-radius-md);
    padding: var(--regiofy-space-md) var(--regiofy-space-lg);
    margin-top: var(--regiofy-space-md);
}

.regiofy-pending-info {
    display: flex;
    align-items: center;
    gap: var(--regiofy-space-md);
    flex: 1;
    min-width: 0;
}

.regiofy-pending-icon {
    flex-shrink: 0;
    color: var(--regiofy-text-tertiary);
}

.regiofy-pending-icon .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.regiofy-pending-details {
    min-width: 0;
}

.regiofy-pending-name {
    display: block;
    font-size: 17px;
    font-weight: 600;
    color: var(--regiofy-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: var(--regiofy-font);
}

.regiofy-pending-address {
    display: block;
    font-size: 14px;
    color: var(--regiofy-text-secondary);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Link-style button for "Change" */
.regiofy-button-link {
    background: none;
    border: none;
    color: var(--regiofy-accent);
    font-size: 14px;
    cursor: pointer;
    padding: 5px 10px;
    text-decoration: none;
    flex-shrink: 0;
    font-family: var(--regiofy-font);
    transition: color 0.2s;
}

.regiofy-button-link:hover {
    color: var(--regiofy-accent-hover);
    text-decoration: underline;
}

/* ==========================================================================
   CONFIRM LOCATION BUTTON - Dark, pill-shaped
   ========================================================================== */

.regiofy-confirm-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--regiofy-space-sm);
    width: 100%;
    margin-top: var(--regiofy-space-lg);
    padding: 16px 32px;
    font-size: 17px;
    font-weight: 400;
    background: var(--regiofy-text-primary);
    color: #fff;
    border: none;
    border-radius: var(--regiofy-radius-full);
    cursor: pointer;
    font-family: var(--regiofy-font);
    transition: background-color 0.2s, transform 0.1s;
}

.regiofy-confirm-btn:hover {
    background: #000;
}

.regiofy-confirm-btn:active {
    transform: scale(0.98);
}

.regiofy-confirm-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* ==========================================================================
   RESPONSIVE 2-STEP UI
   ========================================================================== */

@media (max-width: 480px) {
    .regiofy-step-title {
        font-size: 16px;
    }

    .regiofy-step-number {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }

    .regiofy-pending-selection {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .regiofy-pending-info {
        width: 100%;
    }

    .regiofy-button-link {
        align-self: flex-end;
    }
}

/* ==========================================================================
   SEARCH RESULTS WITH MAP THUMBNAIL - Clean cards
   ========================================================================== */

/* Result card - more padding, breathing room */
.regiofy-result-item {
    display: flex;
    align-items: center;
    gap: var(--regiofy-space-lg);
    padding: var(--regiofy-space-lg);
    border: 1px solid var(--regiofy-border-light);
    border-radius: var(--regiofy-radius-md);
    margin-bottom: var(--regiofy-space-md);
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.regiofy-result-item:hover {
    border-color: var(--regiofy-border);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.regiofy-result-item:last-child {
    margin-bottom: 0;
}

/* Map thumbnail - larger, more prominent */
.regiofy-result-map {
    flex-shrink: 0;
    width: 96px;
    height: 96px;
    border-radius: var(--regiofy-radius-md);
    overflow: hidden;
    border: none;
    background: var(--regiofy-bg-subtle);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.regiofy-result-map img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Result info */
.regiofy-result-info {
    flex: 1;
    min-width: 0;
}

.regiofy-result-name {
    display: block;
    font-size: 17px;
    font-weight: 600;
    color: var(--regiofy-text-primary);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: var(--regiofy-font);
}

.regiofy-result-address {
    display: block;
    font-size: 14px;
    color: var(--regiofy-text-secondary);
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Result rating - muted gray, subtle */
.regiofy-result-rating {
    display: block;
    font-size: 13px;
    font-weight: 400;
    color: var(--regiofy-text-tertiary);
    margin-top: 6px;
}

.regiofy-result-no-rating {
    display: block;
    font-size: 13px;
    font-weight: 400;
    color: var(--regiofy-text-tertiary);
    margin-top: 6px;
}

/* Result count header */
.regiofy-result-count {
    text-align: center;
    color: var(--regiofy-text-secondary);
    font-size: 14px;
    margin-bottom: var(--regiofy-space-lg);
    padding: var(--regiofy-space-sm);
    background: transparent;
    border-radius: 0;
    font-weight: 400;
    font-family: var(--regiofy-font);
}

/* Show all button - Text link style like Apple "Learn more" */
/* Use higher specificity to override .regiofy-button */
.regiofy-product-selector .regiofy-show-all-btn,
.regiofy-show-all-btn.regiofy-button,
.regiofy-show-all-btn {
    display: inline-block !important;
    margin: var(--regiofy-space-xl) auto 0 !important;
    padding: 0 !important;
    font-size: 17px !important;
    font-weight: 400 !important;
    background: transparent !important;
    color: var(--regiofy-accent) !important;
    border: none !important;
    border-radius: 0 !important;
    cursor: pointer;
    font-family: var(--regiofy-font);
    transition: color 0.2s;
    text-align: center;
    width: 100%;
}

.regiofy-product-selector .regiofy-show-all-btn:hover,
.regiofy-show-all-btn.regiofy-button:hover,
.regiofy-show-all-btn:hover {
    background: transparent !important;
    color: var(--regiofy-accent-hover) !important;
    text-decoration: underline;
}

/* Select button - Small dark pill */
.regiofy-result-select {
    flex-shrink: 0;
}

.regiofy-button-small {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 400;
    background: var(--regiofy-text-primary);
    color: #fff;
    border: none;
    border-radius: var(--regiofy-radius-full);
    cursor: pointer;
    font-family: var(--regiofy-font);
    transition: background-color 0.2s;
}

.regiofy-button-small:hover {
    background: #000;
}

/* ==========================================================================
   CTA BUTTONS CONTAINER - Clean, no background
   ========================================================================== */

.regiofy-confirm-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--regiofy-space-md);
    margin-top: var(--regiofy-space-xl);
    padding: 0;
    background: transparent;
    border-radius: 0;
    border: none;
}

/* Primary: Add to cart button - Dark pill */
.regiofy-add-to-cart-btn {
    width: 100%;
    max-width: 350px;
    padding: 18px 36px;
    font-size: 17px;
    font-weight: 400;
    background: var(--regiofy-text-primary);
    color: #fff;
    border: none;
    border-radius: var(--regiofy-radius-full);
    cursor: pointer;
    font-family: var(--regiofy-font);
    transition: background-color 0.2s, transform 0.1s;
}

.regiofy-add-to-cart-btn:hover {
    background: #000;
}

.regiofy-add-to-cart-btn:active {
    transform: scale(0.98);
}

/* Secondary: Add another link */
.regiofy-add-another-link {
    font-size: 14px;
    color: var(--regiofy-accent);
    text-decoration: none;
    padding: var(--regiofy-space-sm) var(--regiofy-space-md);
    font-family: var(--regiofy-font);
    transition: color 0.2s;
}

.regiofy-add-another-link:hover {
    color: var(--regiofy-accent-hover);
}

/* ==========================================================================
   RESPONSIVE SEARCH RESULTS & CTA
   ========================================================================== */

@media (max-width: 480px) {
    .regiofy-result-item {
        flex-wrap: wrap;
        gap: var(--regiofy-space-md);
        padding: var(--regiofy-space-md);
    }

    .regiofy-result-map {
        width: 72px;
        height: 72px;
        border-radius: var(--regiofy-radius-sm);
    }

    .regiofy-result-info {
        flex: 1 1 calc(100% - 88px);
    }

    .regiofy-result-name {
        font-size: 15px;
    }

    .regiofy-result-rating,
    .regiofy-result-no-rating {
        font-size: 12px;
    }

    .regiofy-result-count {
        font-size: 13px;
        padding: var(--regiofy-space-xs);
    }

    .regiofy-result-select {
        width: 100%;
        margin-top: var(--regiofy-space-xs);
    }

    .regiofy-show-all-btn {
        font-size: 15px;
        margin-top: var(--regiofy-space-lg);
    }

    .regiofy-confirm-buttons {
        padding: 0;
    }

    .regiofy-add-to-cart-btn {
        padding: 16px 24px;
        font-size: 17px;
    }
}

/* ==========================================================================
   MAINTENANCE MODE (KILLSWITCH)
   ========================================================================== */

.regiofy-product-selector.regiofy-maintenance-mode {
    position: relative;
}

.regiofy-product-selector.regiofy-maintenance-mode .regiofy-step,
.regiofy-product-selector.regiofy-maintenance-mode .regiofy-selected-business,
.regiofy-product-selector.regiofy-maintenance-mode .regiofy-confirm-buttons,
.regiofy-product-selector.regiofy-maintenance-mode .regiofy-validation-error {
    opacity: 0.3;
    pointer-events: none;
    user-select: none;
}

.regiofy-maintenance-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
}

.regiofy-maintenance-message {
    background: #fff;
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    text-align: center;
    max-width: 320px;
}

.regiofy-maintenance-message .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #ff9800;
    margin-bottom: 15px;
}

.regiofy-maintenance-message strong {
    display: block;
    font-size: 22px;
    color: #333;
    margin-bottom: 10px;
}

.regiofy-maintenance-message p {
    color: #666;
    font-size: 14px;
    margin: 0;
    line-height: 1.5;
}

/* ==========================================================================
   GERMAN LEGAL COMPLIANCE NOTICES
   ========================================================================== */

/* Product Page Footer Notice - subtle, centered */
.regiofy-legal-footer {
    text-align: center;
    color: var(--regiofy-text-tertiary);
    font-size: 12px;
    font-weight: normal;
    margin: var(--regiofy-space-xl) 0 0 0;
    padding-top: var(--regiofy-space-lg);
    border-top: 1px solid var(--regiofy-border-light);
    font-family: var(--regiofy-font);
}

/* Checkout Consent Checkbox - simple like privacy consent */
.regiofy-legal-consent {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

#edd_checkout_form_wrap .regiofy-legal-consent label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    color: #666;
    font-size: 13px;
    font-weight: normal;
    line-height: 1.5;
}

.regiofy-legal-consent input[type="checkbox"] {
    flex-shrink: 0;
    margin-top: 3px;
}

.regiofy-legal-consent .regiofy-required {
    color: #e53935;
}

/* ==========================================================================
   EDD PURCHASE BUTTON OVERRIDE - Apple-like dark pill
   ========================================================================== */

/* Override EDD's blue button on product pages */
.edd_download_purchase_form .edd-add-to-cart.button.blue,
.edd_download_purchase_form .edd-add-to-cart.button,
.edd_download_purchase_form .edd_go_to_checkout.button.blue,
.edd_download_purchase_form .edd_go_to_checkout.button {
    background: var(--regiofy-text-primary) !important;
    color: #fff !important;
    border: none !important;
    border-radius: var(--regiofy-radius-full) !important;
    padding: 14px 28px !important;
    font-size: 17px !important;
    font-weight: 400 !important;
    font-family: var(--regiofy-font) !important;
    transition: background-color 0.2s, transform 0.1s !important;
    text-decoration: none !important;
}

.edd_download_purchase_form .edd-add-to-cart.button.blue:hover,
.edd_download_purchase_form .edd-add-to-cart.button:hover,
.edd_download_purchase_form .edd_go_to_checkout.button.blue:hover,
.edd_download_purchase_form .edd_go_to_checkout.button:hover {
    background: #000 !important;
}

.edd_download_purchase_form .edd-add-to-cart.button.blue:active,
.edd_download_purchase_form .edd-add-to-cart.button:active,
.edd_download_purchase_form .edd_go_to_checkout.button.blue:active,
.edd_download_purchase_form .edd_go_to_checkout.button:active {
    transform: scale(0.98);
}

/* ==========================================================================
   TAX INFO REPOSITIONING
   ========================================================================== */

/* Move tax info below the button */
.edd_download_purchase_form {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--regiofy-space-sm);
}

.edd_purchase_tax_rate {
    display: block;
    order: 10; /* Push to end */
    font-size: 13px;
    color: var(--regiofy-text-secondary);
    font-family: var(--regiofy-font);
}

/* Mobile responsive - EDD button */
@media (max-width: 480px) {
    .edd_download_purchase_form .edd-add-to-cart.button.blue,
    .edd_download_purchase_form .edd-add-to-cart.button,
    .edd_download_purchase_form .edd_go_to_checkout.button.blue,
    .edd_download_purchase_form .edd_go_to_checkout.button {
        width: 100%;
        text-align: center;
    }
}
