/* Frontend Styles for Hunter Processing Orders */

/* ========================================
   ACCESSIBILITY & WCAG COMPLIANCE
   ======================================== */

/*
 * This stylesheet follows WCAG 2.1 Level AA standards:
 *
 * 1. Font Size (Success Criterion 1.4.4):
 *    - Base font: 16px minimum (prevents iOS auto-zoom)
 *    - All input fields: 16px (required for iOS)
 *    - Body text: 16px
 *    - Small text: minimum 15px
 *
 * 2. Line Height (Success Criterion 1.4.12):
 *    - Body text: 1.6 (exceeds WCAG AAA requirement of 1.5)
 *    - Headings: 1.3-1.4
 *    - Form inputs: 1.5
 *
 * 3. Touch Targets (Success Criterion 2.5.5):
 *    - Minimum 44x44px for all interactive elements
 *    - Buttons: 48px minimum height
 *    - Input fields: 48px minimum height (14px padding + 16px text + border)
 *
 * 4. Color Contrast (Success Criterion 1.4.3):
 *    - Normal text: 4.5:1 minimum
 *    - Large text: 3:1 minimum
 *    - All Meatlers theme colors tested and compliant
 *
 * 5. Keyboard Navigation (Success Criterion 2.1.1):
 *    - All interactive elements focusable
 *    - Clear 3px focus indicators
 *    - Skip links for screen readers
 */

/* ========================================
   MEATLERS THEME INTEGRATION
   Typography and base styles
   ======================================== */

.hpo-order-form {
    font-family: var(--hpo-font-text, "Barlow Semi Condensed", sans-serif);
    color: var(--hpo-text, #5C5C5C);
    font-size: 16px; /* WCAG AA compliant base size */
    line-height: 1.6; /* WCAG AAA compliant line-height (minimum 1.5) */
}

.hpo-order-form h1,
.hpo-order-form h2,
.hpo-order-form h3,
.hpo-order-form h4,
.hpo-order-form h5,
.hpo-order-form h6 {
    font-family: var(--hpo-font-heading, "Mona Sans Condensed", sans-serif);
    color: var(--hpo-accent, #1B1B1B);
}

/* Skip Navigation Links (Accessibility) */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--hpo-primary, #B41F25);
    color: var(--hpo-white, #fff);
    padding: 12px 20px;
    text-decoration: none;
    z-index: 100000;
    font-weight: 600;
    border-radius: 0 0 var(--hpo-radius-sm, 6px) 0;
    box-shadow: var(--hpo-shadow-md);
}

.skip-link:focus {
    top: 0;
    outline: 3px solid var(--hpo-white, #fff);
    outline-offset: 2px;
}

.hpo-order-form {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.hpo-form-section {
    margin-bottom: 30px;
    padding: 20px;
    background: var(--hpo-background, #FAF9F7);
    border-radius: var(--hpo-radius, 8px);
}

.hpo-form-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--hpo-border, #EAE7E5);
}

.hpo-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 15px;
}

.hpo-form-field {
    display: flex;
    flex-direction: column;
}

.hpo-form-field.full-width {
    grid-column: 1 / -1;
}

.hpo-form-field label {
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 16px; /* Ensures readability on all devices */
}

.hpo-form-field input[type="text"],
.hpo-form-field input[type="email"],
.hpo-form-field input[type="tel"],
.hpo-form-field input[type="number"],
.hpo-form-field select,
.hpo-form-field textarea {
    padding: 14px 16px; /* Larger padding for better touch targets */
    border: 1px solid var(--hpo-border, #EAE7E5);
    border-radius: 4px;
    font-size: 16px; /* Prevents iOS auto-zoom (accessibility requirement) */
    line-height: 1.5; /* WCAG compliant */
}

/* Keyboard Focus States */
.hpo-form-field input[type="text"]:focus,
.hpo-form-field input[type="email"]:focus,
.hpo-form-field input[type="tel"]:focus,
.hpo-form-field input[type="number"]:focus,
.hpo-form-field select:focus,
.hpo-form-field textarea:focus {
    outline: 3px solid var(--hpo-primary, #B41F25);
    outline-offset: 2px;
    border-color: var(--hpo-primary, #B41F25);
}

input[type="radio"]:focus,
input[type="checkbox"]:focus {
    outline: 3px solid var(--hpo-primary, #B41F25);
    outline-offset: 2px;
}

/* WCAG 2.5.5 Touch Target Size - minimum 44x44px */
input[type="radio"],
input[type="checkbox"] {
    min-width: 20px;
    min-height: 20px;
    cursor: pointer;
}

/* Ensure clickable label area meets touch target requirements */
.hpo-radio-group label,
.hpo-radio-group-vertical label,
.hpo-checkbox-group label,
.hpo-sausage-item label {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 12px 8px 4px;
    cursor: pointer;
    gap: 8px;
}

/* Condition and donation option cards already have adequate size */
label.hpo-condition-option,
label.hpo-donation-option,
label.hpo-checkbox-option {
    min-height: 44px;
    padding: 12px;
}

.hpo-form-field textarea {
    min-height: 100px;
    resize: vertical;
}

.hpo-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hpo-checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hpo-submit-btn {
    background: var(--hpo-primary, #B41F25);
    color: #fff;
    padding: 15px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.hpo-submit-btn:hover {
    background: var(--hpo-primary-hover, #8E1820);
}

.hpo-submit-btn:focus {
    outline: 3px solid var(--hpo-primary, #B41F25);
    outline-offset: 3px;
    background: var(--hpo-primary-hover, #8E1820);
}

.hpo-submit-btn:disabled {
    background: var(--hpo-border, #EAE7E5);
    cursor: not-allowed;
}

/* Fieldset Styles for Accessibility */
fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

fieldset legend {
    padding: 0;
    margin: 0;
}

fieldset legend h4 {
    margin: 0 0 10px 0;
}

.hpo-alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.hpo-alert-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.hpo-alert-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.hpo-my-orders {
    padding: 20px;
}

.hpo-orders-table {
    width: 100%;
    border-collapse: collapse;
}

.hpo-orders-table th,
.hpo-orders-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--hpo-border, #EAE7E5);
}

.hpo-orders-table th {
    background: var(--hpo-background, #FAF9F7);
    font-weight: 600;
}

/* Price Summary Styles */
.hpo-price-summary {
    background: #f0f8ff;
    border: 2px solid var(--hpo-primary, #B41F25);
    border-radius: 8px;
    padding: 25px;
    margin: 30px 0 20px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.hpo-price-summary.hpo-loading {
    opacity: 0.6;
}

.hpo-price-summary h3 {
    margin: 0 0 20px 0;
    padding: 0 0 10px 0;
    border-bottom: 2px solid var(--hpo-primary, #B41F25);
    color: var(--hpo-primary, #B41F25);
    font-size: 20px;
}

.hpo-price-breakdown {
    margin-bottom: 20px;
}

.hpo-price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #d0e8f7;
}

.hpo-price-item:last-child {
    border-bottom: none;
}

.hpo-price-label {
    color: var(--hpo-accent, #1B1B1B);
    font-size: 16px;
}

.hpo-price-value {
    color: var(--hpo-primary, #B41F25);
    font-weight: 600;
    font-size: 16px;
}

.hpo-price-totals {
    border-top: 2px solid var(--hpo-primary, #B41F25);
    padding-top: 15px;
    margin-top: 15px;
}

.hpo-price-total,
.hpo-price-deposit,
.hpo-price-balance {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 16px;
}

.hpo-price-total {
    color: var(--hpo-primary, #B41F25);
    font-size: 18px;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid #d0e8f7;
}

.hpo-price-deposit {
    color: var(--hpo-highlight, #FF9E0C);
}

.hpo-price-balance {
    color: var(--hpo-text, #5C5C5C);
}

/* Form Validation Styles */
.hpo-form-field.hpo-error input,
.hpo-form-field.hpo-error select,
.hpo-form-field.hpo-error textarea {
    border-color: #dc3232;
    background: #fff5f5;
}

.hpo-error-message {
    color: #dc3232;
    font-size: 15px;
    margin-top: 5px;
    display: block;
}

.hpo-form-field.hpo-success input,
.hpo-form-field.hpo-success select {
    border-color: var(--hpo-highlight, #FF9E0C);
}

/* Field-specific error display */
.hpo-field-invalid {
    border-color: #dc3232 !important;
    background: #fff5f5 !important;
}

.hpo-field-error {
    color: #dc3232;
    font-size: 15px;
    margin-top: 5px;
    display: flex;
    align-items: flex-start;
    gap: 5px;
}

.hpo-field-error::before {
    content: '⚠';
    font-size: 16px;
    flex-shrink: 0;
}

.hpo-field-valid {
    border-color: var(--hpo-highlight, #FF9E0C) !important;
}

/* Global error notification */
.hpo-error-notification {
    background: #fff5f5;
    border-left: 4px solid #dc3232;
    padding: 15px 20px;
    margin-bottom: 25px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(220, 50, 50, 0.1);
}

.hpo-error-notification h4 {
    margin: 0 0 10px 0;
    color: #dc3232;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hpo-error-notification h4::before {
    content: '⚠';
    font-size: 18px;
}

.hpo-error-notification ul {
    margin: 0;
    padding-left: 20px;
    color: #721c24;
}

.hpo-error-notification li {
    margin: 5px 0;
}

.hpo-error-notification button {
    background: none;
    border: none;
    color: #dc3232;
    cursor: pointer;
    font-size: 18px;
    position: absolute;
    right: 15px;
    top: 15px;
    padding: 5px;
    line-height: 1;
}

/* Success notification */
.hpo-success-notification {
    background: #f0f9f0;
    border-left: 4px solid var(--hpo-highlight, #FF9E0C);
    padding: 15px 20px;
    margin-bottom: 25px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 163, 42, 0.1);
}

.hpo-success-notification h4 {
    margin: 0 0 10px 0;
    color: var(--hpo-highlight, #FF9E0C);
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hpo-success-notification h4::before {
    content: '✓';
    font-size: 18px;
}

/* Auto-Save Indicator */
.hpo-autosave-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--hpo-highlight, #FF9E0C);
    color: #fff;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    display: none;
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Loading Spinner */
.hpo-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

.hpo-spinner.hpo-spinner-dark {
    border-color: rgba(0, 0, 0, 0.1);
    border-top-color: var(--hpo-primary, #B41F25);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Loading Overlay */
.hpo-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.hpo-loading-content {
    background: #fff;
    padding: 30px 40px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hpo-loading-content .hpo-spinner {
    width: 40px;
    height: 40px;
    border-width: 4px;
    border-color: rgba(0, 115, 170, 0.2);
    border-top-color: var(--hpo-primary, #B41F25);
    margin: 0 0 15px 0;
}

.hpo-loading-content p {
    margin: 0;
    color: var(--hpo-accent, #1B1B1B);
    font-size: 16px;
    font-weight: 600;
}

/* Loading state for buttons */
.hpo-btn.hpo-loading,
.hpo-submit-btn.hpo-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.hpo-btn.hpo-loading::after,
.hpo-submit-btn.hpo-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Loading state for price summary */
.hpo-price-summary.hpo-loading {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
}

.hpo-price-summary.hpo-loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    margin-left: -20px;
    margin-top: -20px;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 115, 170, 0.2);
    border-top-color: var(--hpo-primary, #B41F25);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    z-index: 10;
}

/* Accessible Modal Dialog */
.hpo-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.hpo-modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hpo-modal-content h3 {
    margin: 0 0 15px 0;
    color: var(--hpo-accent, #1B1B1B);
    font-size: 20px;
}

.hpo-modal-content p {
    margin: 0 0 25px 0;
    color: var(--hpo-text, #5C5C5C);
    line-height: 1.5;
}

.hpo-modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.hpo-modal-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hpo-modal-confirm {
    background: var(--hpo-primary, #B41F25);
    color: #fff;
}

.hpo-modal-confirm:hover,
.hpo-modal-confirm:focus {
    background: var(--hpo-primary-hover, #8E1820);
    outline: 3px solid var(--hpo-primary, #B41F25);
    outline-offset: 2px;
}

.hpo-modal-cancel {
    background: #f0f0f0;
    color: var(--hpo-accent, #1B1B1B);
}

.hpo-modal-cancel:hover,
.hpo-modal-cancel:focus {
    background: #e0e0e0;
    outline: 3px solid var(--hpo-text, #5C5C5C);
    outline-offset: 2px;
}

/* Order Tracking Styles */
.hpo-order-tracking {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.hpo-tracking-form {
    background: var(--hpo-background, #FAF9F7);
    padding: 30px;
    border-radius: 8px;
    margin-top: 20px;
}

.hpo-tracking-fields {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 15px;
    align-items: end;
    margin-top: 20px;
}

.hpo-order-details {
    margin-top: 30px;
}

.hpo-order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--hpo-border, #EAE7E5);
    margin-bottom: 30px;
}

.hpo-track-another {
    background: #f0f0f0;
    color: var(--hpo-accent, #1B1B1B);
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.2s ease;
}

.hpo-track-another:hover,
.hpo-track-another:focus {
    background: #e0e0e0;
    outline: 3px solid var(--hpo-text, #5C5C5C);
    outline-offset: 2px;
}

/* Status Timeline */
.hpo-status-timeline {
    background: var(--hpo-background, #FAF9F7);
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.hpo-status-timeline h4 {
    margin: 0 0 25px 0;
    font-size: 18px;
}

.hpo-timeline {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.hpo-timeline-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hpo-timeline-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    right: -50%;
    height: 3px;
    background: var(--hpo-border, #EAE7E5);
    z-index: 0;
}

.hpo-timeline-item.hpo-timeline-completed:not(:last-child)::after {
    background: var(--hpo-highlight, #FF9E0C);
}

.hpo-timeline-marker {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
    background: #fff;
}

.hpo-timeline-completed .hpo-timeline-marker {
    background: var(--hpo-highlight, #FF9E0C);
    border: 3px solid var(--hpo-highlight, #FF9E0C);
}

.hpo-timeline-current .hpo-timeline-marker {
    background: var(--hpo-primary, #B41F25);
    border: 3px solid var(--hpo-primary, #B41F25);
    animation: pulse 2s infinite;
}

.hpo-timeline-upcoming .hpo-timeline-marker {
    background: #fff;
    border: 3px solid var(--hpo-border, #EAE7E5);
}

.hpo-timeline-checkmark {
    color: #fff;
    font-size: 20px;
    font-weight: bold;
}

.hpo-timeline-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
}

.hpo-timeline-circle {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--hpo-border, #EAE7E5);
}

.hpo-timeline-content {
    font-size: 16px;
}

.hpo-status-badge {
    display: inline-block;
    background: var(--hpo-primary, #B41F25);
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(0, 115, 170, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(0, 115, 170, 0);
    }
}

/* Order Information */
.hpo-order-info,
.hpo-processing-details {
    background: #fff;
    padding: 25px;
    border: 1px solid var(--hpo-border, #EAE7E5);
    border-radius: 8px;
    margin-bottom: 20px;
}

.hpo-order-info h4,
.hpo-processing-details h4 {
    margin: 0 0 20px 0;
    font-size: 16px;
    color: var(--hpo-accent, #1B1B1B);
}

.hpo-info-list {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 15px 20px;
    margin: 0;
}

.hpo-info-list dt {
    font-weight: 600;
    color: var(--hpo-text, #5C5C5C);
}

.hpo-info-list dd {
    margin: 0;
    color: var(--hpo-accent, #1B1B1B);
}

.hpo-processing-details ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hpo-processing-details li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.hpo-processing-details li:last-child {
    border-bottom: none;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .hpo-order-form {
        padding: 15px;
    }

    .hpo-tracking-fields {
        grid-template-columns: 1fr;
    }

    .hpo-order-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .hpo-timeline {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .hpo-timeline-item::after {
        display: none;
    }

    .hpo-timeline-item::before {
        content: '';
        position: absolute;
        top: 50px;
        left: 20px;
        bottom: -30px;
        width: 3px;
        background: var(--hpo-border, #EAE7E5);
        z-index: 0;
    }

    .hpo-timeline-item.hpo-timeline-completed::before {
        background: var(--hpo-highlight, #FF9E0C);
    }

    .hpo-timeline-item:last-child::before {
        display: none;
    }

    .hpo-timeline-item {
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
        gap: 15px;
    }

    .hpo-info-list {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .hpo-info-list dt {
        margin-top: 15px;
    }

    .hpo-info-list dt:first-child {
        margin-top: 0;
    }

    .hpo-form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .hpo-form-section {
        padding: 15px;
        margin-bottom: 20px;
    }

    .hpo-form-section h3 {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .hpo-form-field label {
        font-size: 16px;
    }

    .hpo-form-field input[type="text"],
    .hpo-form-field input[type="email"],
    .hpo-form-field input[type="tel"],
    .hpo-form-field select,
    .hpo-form-field textarea,
    .hpo-form-field input[type="number"] {
        padding: 12px;
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 44px; /* iOS touch target minimum */
    }

    /* Better touch targets for radio buttons and checkboxes */
    .hpo-radio-group label,
    .hpo-checkbox-group label,
    .hpo-sausage-item label {
        padding: 12px;
        min-height: 44px;
        display: flex;
        align-items: center;
        cursor: pointer;
        background: #fff;
        border: 1px solid var(--hpo-border, #EAE7E5);
        border-radius: 4px;
        margin-bottom: 8px;
    }

    .hpo-radio-group label:hover,
    .hpo-checkbox-group label:hover,
    .hpo-sausage-item label:hover {
        background: var(--hpo-background, #FAF9F7);
    }

    .hpo-radio-group input[type="radio"],
    .hpo-checkbox-group input[type="checkbox"],
    .hpo-sausage-item input[type="checkbox"] {
        width: 20px;
        height: 20px;
        margin-right: 10px;
    }

    .hpo-submit-btn {
        width: 100%;
        padding: 16px;
        font-size: 18px;
        min-height: 48px;
    }

    .hpo-price-summary {
        padding: 20px 15px;
        margin: 20px 0 15px 0;
    }

    .hpo-price-summary h3 {
        font-size: 18px;
    }

    .hpo-price-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        padding: 12px 0;
    }

    .hpo-price-label,
    .hpo-price-value {
        font-size: 15px;
    }

    .hpo-price-total {
        font-size: 16px;
    }

    .hpo-autosave-indicator {
        top: 10px;
        right: 10px;
        padding: 8px 15px;
        font-size: 14px;
    }

    /* Processing groups on mobile */
    .hpo-processing-group {
        margin-bottom: 20px;
    }

    .hpo-processing-group h4 {
        font-size: 16px;
        margin-bottom: 10px;
    }

    /* Sausage varieties on mobile */
    .hpo-sausage-item {
        margin-bottom: 12px;
    }

    .hpo-sausage-qty {
        margin-top: 8px;
        width: 100%;
        padding: 12px;
        font-size: 16px;
        min-height: 44px;
    }

    /* Alert messages on mobile */
    .hpo-alert {
        padding: 12px;
        font-size: 16px;
        margin-bottom: 15px;
    }

    /* Payment options on mobile */
    .hpo-payment-options {
        padding: 15px !important;
    }

    .hpo-payment-options h3 {
        font-size: 18px;
    }

    .hpo-payment-options .button {
        display: block;
        width: 100%;
        text-align: center;
        margin: 10px 0 !important;
        padding: 14px;
        font-size: 16px;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .hpo-order-form {
        padding: 10px;
    }

    .hpo-form-section {
        padding: 12px;
        border-radius: 6px;
    }

    .hpo-price-summary {
        padding: 15px 12px;
    }

    .hpo-price-summary h3 {
        font-size: 16px;
    }
}

/* ========================================
   CAROUSEL STYLES
   ======================================== */

/* Carousel Container */
.hpo-carousel {
    position: relative;
    overflow: hidden;
}

/* Progress Bar */
.hpo-progress-container {
    margin-bottom: 40px;
    padding: 20px 0;
}

.hpo-progress-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.hpo-progress-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    cursor: default;
}

.hpo-progress-step.hpo-progress-completed,
.hpo-progress-step.hpo-progress-active {
    cursor: pointer;
}

/* Progress connecting lines */
.hpo-progress-step:not(:last-child)::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    right: -50%;
    height: 3px;
    background: var(--hpo-border, #EAE7E5);
    z-index: 0;
    transition: background 0.3s ease;
}

.hpo-progress-step.hpo-progress-completed:not(:last-child)::before {
    background: var(--hpo-primary, #B41F25);
}

/* Progress circles */
.hpo-progress-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--hpo-border, #EAE7E5);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.hpo-progress-step.hpo-progress-completed .hpo-progress-circle {
    background: var(--hpo-primary, #B41F25);
    border-color: var(--hpo-primary, #B41F25);
}

.hpo-progress-step.hpo-progress-active .hpo-progress-circle {
    background: var(--hpo-primary, #B41F25);
    border-color: var(--hpo-primary, #B41F25);
    box-shadow: 0 0 0 4px rgba(0, 115, 170, 0.2);
}

/* Step numbers and icons */
.hpo-step-number {
    color: #999;
    font-weight: 600;
    font-size: 16px;
}

.hpo-progress-step.hpo-progress-active .hpo-step-number,
.hpo-progress-step.hpo-progress-completed .hpo-step-number {
    color: #fff;
}

.hpo-step-check {
    display: none;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
}

.hpo-progress-step.hpo-progress-completed .hpo-step-number {
    display: none;
}

.hpo-progress-step.hpo-progress-completed .hpo-step-check {
    display: block;
}

/* Step labels */
.hpo-step-label {
    font-size: 14px;
    color: var(--hpo-text, #5C5C5C);
    font-weight: 500;
    transition: color 0.3s ease;
}

.hpo-progress-step.hpo-progress-active .hpo-step-label {
    color: var(--hpo-primary, #B41F25);
    font-weight: 600;
}

.hpo-progress-step.hpo-progress-completed .hpo-step-label {
    color: var(--hpo-accent, #1B1B1B);
    font-weight: 600;
}

/* Form Steps */
.hpo-form-step {
    display: none;
    animation: fadeIn 0.3s ease;
}

.hpo-form-step.hpo-step-active {
    display: block !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Step headings */
.hpo-form-step h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--hpo-accent, #1B1B1B);
}

.hpo-step-description {
    color: var(--hpo-text, #5C5C5C);
    margin-bottom: 30px;
    font-size: 16px;
}

/* Form Navigation */
.hpo-form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid var(--hpo-border, #EAE7E5);
}

.hpo-btn {
    padding: 14px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hpo-btn:focus {
    outline: 3px solid var(--hpo-primary, #B41F25);
    outline-offset: 2px;
}

.hpo-btn-primary {
    background: var(--hpo-primary, #B41F25);
    color: #fff;
}

.hpo-btn-primary:hover {
    background: var(--hpo-primary-hover, #8E1820);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.3);
}

.hpo-btn-secondary {
    background: #f0f0f0;
    color: var(--hpo-accent, #1B1B1B);
}

.hpo-btn-secondary:hover {
    background: #e0e0e0;
}

.hpo-btn-success {
    background: var(--hpo-highlight, #FF9E0C);
    color: #fff;
}

.hpo-btn-success:hover {
    background: #008a20;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 163, 42, 0.3);
}

/* Badges */
.hpo-option-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hpo-option-badge.hpo-badge-success {
    background: #d4edda;
    color: #155724;
}

.hpo-option-badge.hpo-badge-warning {
    background: #fff3cd;
    color: #856404;
}

.hpo-option-badge.hpo-badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

.hpo-option-badge.hpo-badge-primary {
    background: #cce5ff;
    color: #004085;
}

/* Alert boxes */
.hpo-alert-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.hpo-alert-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

/* Radio and Checkbox Option Cards */
.hpo-condition-options,
.hpo-donation-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

/* Label is the parent container for radio buttons */
label.hpo-condition-option,
label.hpo-donation-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--hpo-background, #FAF9F7);
    border: 2px solid var(--hpo-border, #EAE7E5);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 60px;
}

/* Radio button styling - make it visible */
label.hpo-condition-option input[type="radio"],
label.hpo-donation-option input[type="radio"] {
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: var(--hpo-primary, #B41F25);
}

/* Content div styling */
label.hpo-condition-option > div,
label.hpo-donation-option > div {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Checked state */
label.hpo-condition-option:has(input[type="radio"]:checked),
label.hpo-donation-option:has(input[type="radio"]:checked) {
    background: #e6f3ff;
    border-color: var(--hpo-primary, #B41F25);
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

/* Hover state */
label.hpo-condition-option:hover,
label.hpo-donation-option:hover {
    border-color: var(--hpo-primary, #B41F25);
    background: #f0f8ff;
}

/* Focus state */
label.hpo-condition-option:has(input[type="radio"]:focus),
label.hpo-donation-option:has(input[type="radio"]:focus) {
    outline: 3px solid var(--hpo-primary, #B41F25);
    outline-offset: 2px;
}

.hpo-option-label-text {
    flex: 1;
}

.hpo-option-label-text strong {
    display: block;
    color: var(--hpo-accent, #1B1B1B);
    font-size: 15px;
    margin-bottom: 4px;
}

.hpo-option-label-text span {
    display: block;
    color: var(--hpo-text, #5C5C5C);
    font-size: 15px;
}

/* Checkbox Options */
.hpo-checkbox-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

/* Checkbox option styling - label is the parent container */
label.hpo-checkbox-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--hpo-background, #FAF9F7);
    border: 2px solid var(--hpo-border, #EAE7E5);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

label.hpo-checkbox-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
    flex-shrink: 0;
}

label.hpo-checkbox-option > div {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

label.hpo-checkbox-option input[type="checkbox"]:checked {
    accent-color: var(--hpo-primary, #B41F25);
}

label.hpo-checkbox-option:has(input[type="checkbox"]:checked) {
    background: #e6f3ff;
    border-color: var(--hpo-primary, #B41F25);
}

label.hpo-checkbox-option:hover {
    border-color: var(--hpo-primary, #B41F25);
}

label.hpo-checkbox-option:has(input[type="checkbox"]:focus) {
    outline: 3px solid var(--hpo-primary, #B41F25);
    outline-offset: 2px;
}

/* CSS :has() fallback classes for older browsers (Safari < 15.4, older Edge)
   These classes are applied via JavaScript when :has() is not supported */
label.hpo-condition-option.hpo-has-checked,
label.hpo-donation-option.hpo-has-checked {
    background: #e6f3ff;
    border-color: var(--hpo-primary, #B41F25);
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

label.hpo-condition-option.hpo-has-focus,
label.hpo-donation-option.hpo-has-focus {
    outline: 3px solid var(--hpo-primary, #B41F25);
    outline-offset: 2px;
}

label.hpo-checkbox-option.hpo-has-checked {
    background: #e6f3ff;
    border-color: var(--hpo-primary, #B41F25);
}

label.hpo-checkbox-option.hpo-has-focus {
    outline: 3px solid var(--hpo-primary, #B41F25);
    outline-offset: 2px;
}

/* Conditional fields - hidden by default, shown via JavaScript */
.hpo-license-number-field,
.hpo-digital-tag-upload-field,
.hpo-skinned-whole-weight,
.hpo-quartered-weight,
.hpo-partial-donation-fields,
.hpo-refrigerated-storage-fields,
.hpo-freezer-storage-fields {
    display: none;
    margin-top: 20px;
    padding: 20px;
    background: #f0f8ff;
    border: 1px solid #cce5ff;
    border-radius: 6px;
}

/* Fix: When conditional fields also have hpo-form-row, ensure display:none takes precedence initially */
/* and that when shown, they override the grid display properly */
.hpo-form-row.hpo-license-number-field,
.hpo-form-row.hpo-digital-tag-upload-field,
.hpo-form-row.hpo-skinned-whole-weight,
.hpo-form-row.hpo-quartered-weight,
.hpo-form-row.hpo-partial-donation-fields {
    display: none;
}

/* Field description text */
.hpo-field-description {
    font-size: 15px;
    color: var(--hpo-text, #5C5C5C);
    margin-top: 8px;
    line-height: 1.5;
}

/* Review Step */
.hpo-review-section {
    background: var(--hpo-background, #FAF9F7);
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.hpo-review-section h4 {
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--hpo-border, #EAE7E5);
    color: var(--hpo-accent, #1B1B1B);
    font-size: 18px;
}

.hpo-review-list {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px 20px;
    margin: 0;
}

.hpo-review-list dt {
    font-weight: 600;
    color: var(--hpo-text, #5C5C5C);
}

.hpo-review-list dd {
    margin: 0;
    color: var(--hpo-accent, #1B1B1B);
}

.hpo-review-processing,
.hpo-review-services {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hpo-review-processing li,
.hpo-review-services li {
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.hpo-review-processing li:last-child,
.hpo-review-services li:last-child {
    border-bottom: none;
}

.hpo-review-processing ul {
    list-style: disc;
    margin: 10px 0 0 20px;
}

.hpo-review-pricing {
    background: #fff;
    padding: 25px;
    border: 2px solid var(--hpo-primary, #B41F25);
    border-radius: 8px;
    margin-top: 30px;
}

.hpo-review-pricing h4 {
    margin: 0 0 20px 0;
    color: var(--hpo-primary, #B41F25);
    font-size: 20px;
}

.hpo-submit-confirmation {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 20px;
    border-radius: 6px;
    margin-top: 25px;
}

.hpo-submit-confirmation h4 {
    margin: 0 0 10px 0;
    color: #856404;
    font-size: 16px;
}

.hpo-submit-confirmation p {
    margin: 0;
    color: #856404;
    font-size: 16px;
    line-height: 1.6;
}

/* Price Summary Sidebar */
.hpo-price-summary-sidebar {
    position: sticky;
    top: 20px;
    background: #f0f8ff;
    border: 2px solid var(--hpo-primary, #B41F25);
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.hpo-price-summary-sidebar h3 {
    margin: 0 0 20px 0;
    padding: 0 0 10px 0;
    border-bottom: 2px solid var(--hpo-primary, #B41F25);
    color: var(--hpo-primary, #B41F25);
    font-size: 18px;
}

/* Mobile Responsiveness for Carousel */
@media (max-width: 768px) {
    .hpo-progress-bar {
        flex-wrap: wrap;
        gap: 15px;
    }

    .hpo-progress-step {
        flex: 1 1 30%;
        min-width: 80px;
    }

    .hpo-progress-step:not(:last-child)::before {
        display: none;
    }

    .hpo-step-label {
        font-size: 13px;
    }

    .hpo-progress-circle {
        width: 35px;
        height: 35px;
    }

    .hpo-step-number {
        font-size: 16px;
    }

    .hpo-form-step h3 {
        font-size: 20px;
    }

    .hpo-step-description {
        font-size: 15px;
    }

    .hpo-form-navigation {
        flex-direction: column;
        gap: 10px;
    }

    .hpo-form-navigation .hpo-btn {
        width: 100%;
        justify-content: center;
    }

    .hpo-btn-prev {
        order: 2;
    }

    .hpo-btn-next,
    .hpo-btn-submit {
        order: 1;
    }

    .hpo-condition-option label,
    .hpo-donation-option label {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 14px 16px;
    }

    .hpo-option-badge {
        margin-left: 0;
        margin-top: 4px;
    }

    .hpo-review-list {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .hpo-review-list dt {
        margin-top: 15px;
        font-size: 16px;
    }

    .hpo-review-list dt:first-child {
        margin-top: 0;
    }

    .hpo-review-list dd {
        font-size: 16px;
    }

    .hpo-price-summary-sidebar {
        position: static;
        margin-top: 30px;
    }
}

@media (max-width: 480px) {
    .hpo-progress-step {
        flex: 1 1 45%;
    }

    .hpo-progress-container {
        margin-bottom: 30px;
        padding: 15px 0;
    }

    .hpo-btn {
        padding: 14px 20px;
        font-size: 15px;
    }

    .hpo-review-section {
        padding: 20px 15px;
    }

    .hpo-review-section h4 {
        font-size: 16px;
    }
}

