/*
 * Enhanced Modern UI/UX for Hunter Processing Orders
 * Meatlers Theme Integration - Modern Update
 *
 * This file contains enhanced styles on top of the base frontend.css
 * Focus: Modern card design, smooth animations, better visual hierarchy
 */

/* ========================================
   ENHANCED THEME VARIABLES
   ======================================== */
:root {
    /* Enhanced spacing scale */
    --hpo-space-xs: 8px;
    --hpo-space-sm: 12px;
    --hpo-space-md: 20px;
    --hpo-space-lg: 32px;
    --hpo-space-xl: 48px;

    /* Enhanced shadows for depth */
    --hpo-shadow-card: 0 2px 8px rgba(0, 0, 0, 0.06),
                        0 1px 4px rgba(0, 0, 0, 0.04);
    --hpo-shadow-card-hover: 0 8px 24px rgba(0, 0, 0, 0.12),
                              0 4px 8px rgba(0, 0, 0, 0.08);
    --hpo-shadow-card-active: 0 4px 12px rgba(180, 31, 37, 0.2),
                               0 2px 6px rgba(180, 31, 37, 0.1);

    /* Gradient overlays */
    --hpo-gradient-primary: linear-gradient(135deg, #B41F25 0%, #8E1820 100%);
    --hpo-gradient-highlight: linear-gradient(135deg, #FF9E0C 0%, #FF8500 100%);
    --hpo-gradient-subtle: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(180,31,37,0.03) 100%);
}

/* ========================================
   ENHANCED FORM CONTAINER
   ======================================== */
.hpo-order-form {
    background: linear-gradient(180deg, #FFFFFF 0%, #FAF9F7 100%);
    padding: var(--hpo-space-lg) var(--hpo-space-md);
    border-radius: 16px;
}

/* ========================================
   MODERN PROGRESS BAR
   ======================================== */
.hpo-progress-container {
    background: #FFFFFF;
    border-radius: 16px;
    padding: var(--hpo-space-lg);
    margin-bottom: var(--hpo-space-xl);
    box-shadow: var(--hpo-shadow-card);
    position: relative;
    overflow: hidden;
}

.hpo-progress-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--hpo-gradient-primary);
}

.hpo-progress-bar {
    position: relative;
    padding: var(--hpo-space-sm) 0;
}

/* Enhanced progress circles */
.hpo-progress-circle {
    width: 48px;
    height: 48px;
    border: 3px solid var(--hpo-border, #EAE7E5);
    background: #FFFFFF;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hpo-progress-step.hpo-progress-active .hpo-progress-circle {
    background: var(--hpo-gradient-primary);
    border-color: var(--hpo-primary, #B41F25);
    box-shadow: 0 4px 12px rgba(180, 31, 37, 0.3),
                0 0 0 4px rgba(180, 31, 37, 0.1);
    transform: scale(1.1);
}

.hpo-progress-step.hpo-progress-completed .hpo-progress-circle {
    background: var(--hpo-gradient-highlight);
    border-color: var(--hpo-highlight, #FF9E0C);
    box-shadow: 0 2px 8px rgba(255, 158, 12, 0.3);
}

.hpo-progress-step:hover .hpo-progress-circle {
    transform: scale(1.05);
}

/* Enhanced step labels */
.hpo-step-label {
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
}

.hpo-progress-step.hpo-progress-active .hpo-step-label {
    color: var(--hpo-primary, #B41F25);
    font-size: 15px;
}

/* ========================================
   ENHANCED FORM SECTIONS
   ======================================== */
.hpo-form-section {
    background: #FFFFFF;
    border: 1px solid rgba(234, 231, 229, 0.6);
    border-radius: 12px;
    padding: var(--hpo-space-lg);
    margin-bottom: var(--hpo-space-lg);
    box-shadow: var(--hpo-shadow-card);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.hpo-form-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--hpo-gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hpo-form-section:hover::before,
.hpo-form-section:focus-within::before {
    opacity: 1;
}

.hpo-form-section:hover {
    box-shadow: var(--hpo-shadow-card-hover);
    transform: translateY(-2px);
}

.hpo-form-section h3,
.hpo-form-section h4 {
    color: var(--hpo-accent, #1B1B1B);
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: var(--hpo-space-md);
}

.hpo-form-section h3 {
    font-size: 24px;
    padding-bottom: var(--hpo-space-sm);
    border-bottom: 3px solid var(--hpo-primary, #B41F25);
    display: inline-block;
    margin-bottom: var(--hpo-space-lg);
}

.hpo-form-section h4 {
    font-size: 18px;
    position: relative;
    padding-left: 16px;
}

.hpo-form-section h4::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    width: 4px;
    height: 16px;
    background: var(--hpo-gradient-primary);
    border-radius: 2px;
}

/* ========================================
   ENHANCED FORM INPUTS
   ======================================== */
.hpo-form-field label {
    font-weight: 600;
    color: var(--hpo-accent, #1B1B1B);
    font-size: 15px;
    margin-bottom: var(--hpo-space-xs);
    letter-spacing: 0.2px;
}

.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 {
    border: 2px solid var(--hpo-border, #EAE7E5);
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 16px;
    background: #FFFFFF;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.hpo-form-field input:hover,
.hpo-form-field select:hover,
.hpo-form-field textarea:hover {
    border-color: rgba(180, 31, 37, 0.3);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.hpo-form-field input:focus,
.hpo-form-field select:focus,
.hpo-form-field textarea:focus {
    border-color: var(--hpo-primary, #B41F25);
    outline: none;
    box-shadow: 0 0 0 4px rgba(180, 31, 37, 0.1),
                0 2px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

/* ========================================
   MODERN OPTION CARDS
   ======================================== */
label.hpo-condition-option,
label.hpo-donation-option,
label.hpo-checkbox-option {
    background: #FFFFFF;
    border: 2px solid var(--hpo-border, #EAE7E5);
    border-radius: 12px;
    padding: 20px 24px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

/* Subtle gradient overlay */
label.hpo-condition-option::before,
label.hpo-donation-option::before,
label.hpo-checkbox-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--hpo-gradient-subtle);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

/* Hover state */
label.hpo-condition-option:hover,
label.hpo-donation-option:hover,
label.hpo-checkbox-option:hover {
    border-color: var(--hpo-primary, #B41F25);
    box-shadow: 0 4px 12px rgba(180, 31, 37, 0.12);
    transform: translateY(-2px);
}

label.hpo-condition-option:hover::before,
label.hpo-donation-option:hover::before,
label.hpo-checkbox-option:hover::before {
    opacity: 1;
}

/* Checked state */
label.hpo-condition-option:has(input:checked),
label.hpo-donation-option:has(input:checked),
label.hpo-checkbox-option:has(input:checked) {
    background: linear-gradient(135deg, #FFF5F6 0%, #FFF9F0 100%);
    border-color: var(--hpo-primary, #B41F25);
    border-width: 3px;
    box-shadow: var(--hpo-shadow-card-active);
    transform: translateY(-3px);
}

/* Active indicator */
label.hpo-condition-option:has(input:checked)::after,
label.hpo-donation-option:has(input:checked)::after,
label.hpo-checkbox-option:has(input:checked)::after {
    content: '✓';
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    background: var(--hpo-gradient-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(180, 31, 37, 0.3);
    animation: checkmark-pop 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes checkmark-pop {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(10deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* Enhanced radio/checkbox styling */
label.hpo-condition-option input[type="radio"],
label.hpo-donation-option input[type="radio"],
label.hpo-checkbox-option input[type="checkbox"] {
    width: 24px;
    height: 24px;
    border: 2px solid var(--hpo-border, #EAE7E5);
    transition: all 0.2s ease;
}

label.hpo-condition-option input[type="radio"]:checked,
label.hpo-donation-option input[type="radio"]:checked,
label.hpo-checkbox-option input[type="checkbox"]:checked {
    accent-color: var(--hpo-primary, #B41F25);
    transform: scale(1.1);
}

/* Option text styling */
.hpo-option-label-text strong {
    font-size: 16px;
    color: var(--hpo-accent, #1B1B1B);
    font-weight: 700;
    display: block;
    margin-bottom: 6px;
}

.hpo-option-description {
    font-size: 14px;
    color: var(--hpo-text, #5C5C5C);
    line-height: 1.5;
    margin-top: 6px !important;
}

/* ========================================
   ENHANCED BADGES
   ======================================== */
.hpo-option-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.hpo-option-badge.hpo-badge-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.hpo-option-badge.hpo-badge-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
}

.hpo-option-badge.hpo-badge-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
}

.hpo-option-badge.hpo-badge-primary {
    background: var(--hpo-gradient-primary);
    color: white;
}

/* ========================================
   ENHANCED PRICE SUMMARY
   ======================================== */
.hpo-price-summary {
    background: linear-gradient(135deg, #FFFFFF 0%, #FFF9F0 100%);
    border: 3px solid var(--hpo-primary, #B41F25);
    border-radius: 16px;
    padding: var(--hpo-space-lg);
    margin: var(--hpo-space-xl) 0;
    box-shadow: var(--hpo-shadow-card-hover);
    position: relative;
    overflow: hidden;
}

.hpo-price-summary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--hpo-gradient-primary);
}

.hpo-price-summary h3 {
    color: var(--hpo-primary, #B41F25);
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 var(--hpo-space-md) 0;
    padding-bottom: var(--hpo-space-sm);
    border-bottom: 2px solid rgba(180, 31, 37, 0.2);
    letter-spacing: -0.5px;
}

.hpo-price-item {
    padding: 12px 0;
    border-bottom: 1px solid rgba(234, 231, 229, 0.5);
    transition: all 0.2s ease;
}

.hpo-price-item:hover {
    background: rgba(180, 31, 37, 0.02);
    padding-left: 8px;
    margin-left: -8px;
    border-radius: 6px;
}

.hpo-price-label {
    font-size: 15px;
    color: var(--hpo-text, #5C5C5C);
    font-weight: 500;
}

.hpo-price-value {
    font-size: 17px;
    color: var(--hpo-primary, #B41F25);
    font-weight: 700;
    letter-spacing: 0.3px;
}

.hpo-price-total {
    font-size: 22px;
    font-weight: 800;
    padding: var(--hpo-space-md) 0;
    margin-top: var(--hpo-space-sm);
    border-top: 3px solid var(--hpo-primary, #B41F25);
    border-bottom: none;
}

.hpo-price-total .hpo-price-value {
    font-size: 28px;
    background: var(--hpo-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   ENHANCED BUTTONS
   ======================================== */
.hpo-btn,
.hpo-submit-btn,
.hpo-btn-primary {
    background: var(--hpo-gradient-primary);
    color: white;
    padding: 16px 32px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(180, 31, 37, 0.3),
                0 2px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.hpo-btn::before,
.hpo-submit-btn::before,
.hpo-btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.hpo-btn:hover::before,
.hpo-submit-btn:hover::before,
.hpo-btn-primary:hover::before {
    left: 100%;
}

.hpo-btn:hover,
.hpo-submit-btn:hover,
.hpo-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(180, 31, 37, 0.4),
                0 4px 12px rgba(0, 0, 0, 0.15);
}

.hpo-btn:active,
.hpo-submit-btn:active,
.hpo-btn-primary:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(180, 31, 37, 0.3);
}

.hpo-btn-secondary {
    background: linear-gradient(135deg, #F5F5F5 0%, #E8E8E8 100%);
    color: var(--hpo-accent, #1B1B1B);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.hpo-btn-secondary:hover {
    background: linear-gradient(135deg, #E8E8E8 0%, #DADADA 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.hpo-btn-success {
    background: var(--hpo-gradient-highlight);
    box-shadow: 0 4px 12px rgba(255, 158, 12, 0.3);
}

.hpo-btn-success:hover {
    box-shadow: 0 8px 20px rgba(255, 158, 12, 0.4);
}

/* ========================================
   ENHANCED ALERTS
   ======================================== */
.hpo-alert {
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: var(--hpo-space-md);
    border-left: 4px solid;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    animation: slide-in 0.4s ease;
}

@keyframes slide-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hpo-alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-color: #28a745;
}

.hpo-alert-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border-color: #dc3545;
}

.hpo-alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-color: #ffc107;
}

.hpo-alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    border-color: #17a2b8;
}

/* ========================================
   ENHANCED FORM NAVIGATION
   ======================================== */
.hpo-form-navigation {
    background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(250,249,247,0.5) 100%);
    padding: var(--hpo-space-lg);
    border-radius: 12px;
    margin-top: var(--hpo-space-xl);
}

/* ========================================
   LOADING STATES
   ======================================== */
.hpo-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.hpo-spinner.hpo-spinner-dark {
    border-color: rgba(180, 31, 37, 0.2);
    border-top-color: var(--hpo-primary, #B41F25);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.hpo-loading-overlay {
    background: rgba(27, 27, 27, 0.7);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.hpo-loading-content {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: fade-in-scale 0.3s ease;
}

@keyframes fade-in-scale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ========================================
   FIELD DESCRIPTIONS
   ======================================== */
.hpo-field-description {
    font-size: 14px;
    color: var(--hpo-text, #5C5C5C);
    line-height: 1.5;
    margin-top: 6px;
    padding: 8px 12px;
    background: rgba(250, 249, 247, 0.5);
    border-radius: 6px;
    border-left: 3px solid var(--hpo-highlight, #FF9E0C);
}

/* ========================================
   STEP HEADINGS
   ======================================== */
.hpo-step-heading {
    font-size: 32px;
    font-weight: 800;
    color: var(--hpo-accent, #1B1B1B);
    margin-bottom: var(--hpo-space-sm);
    letter-spacing: -1px;
    position: relative;
    padding-bottom: var(--hpo-space-sm);
}

.hpo-step-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: var(--hpo-gradient-primary);
    border-radius: 2px;
}

.hpo-step-description {
    font-size: 16px;
    color: var(--hpo-text, #5C5C5C);
    line-height: 1.6;
    margin-bottom: var(--hpo-space-lg);
}

/* ========================================
   SMOOTH TRANSITIONS FOR STEP CHANGES
   ======================================== */
.hpo-form-step {
    animation: step-fade-in 0.5s ease;
}

@keyframes step-fade-in {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ========================================
   MOBILE ENHANCEMENTS
   ======================================== */
@media (max-width: 768px) {
    .hpo-form-section {
        padding: var(--hpo-space-md);
        border-radius: 10px;
    }

    .hpo-step-heading {
        font-size: 24px;
    }

    .hpo-progress-circle {
        width: 40px;
        height: 40px;
    }

    label.hpo-condition-option,
    label.hpo-donation-option,
    label.hpo-checkbox-option {
        padding: 16px 18px;
    }

    .hpo-btn,
    .hpo-submit-btn {
        width: 100%;
        padding: 18px 24px;
        font-size: 17px;
    }

    .hpo-price-summary {
        padding: var(--hpo-space-md);
    }
}

@media (max-width: 480px) {
    .hpo-order-form {
        padding: var(--hpo-space-sm);
    }

    .hpo-progress-container {
        padding: var(--hpo-space-md);
    }

    .hpo-form-section h3 {
        font-size: 20px;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .hpo-form-navigation,
    .hpo-progress-container,
    .hpo-submit-btn {
        display: none;
    }

    .hpo-form-section {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
}
