/**
 * Photo Uploader Core CSS
 * Consolidated stylesheet with single definitions for all components
 * Generated from frontend cleanup consolidation process
 */

/* ==========================================================================
   CSS CUSTOM PROPERTIES (VARIABLES)
   ========================================================================== */

:root {
    /* Primary Brand Colors - Can be overridden by backend settings */
    --pu-primary: #007cba;
    --pu-secondary: #005a87;
    --pu-accent: #00a0d2;
    --pu-text-color: #333333;

    /* Derived Brand Colors - Fallbacks for older browsers */
    --pu-primary-light: #4da6d9;
    /* Fallback */
    --pu-primary-light: color-mix(in srgb, var(--pu-primary) 80%, white);
    --pu-primary-dark: #005a87;
    /* Fallback */
    --pu-primary-dark: color-mix(in srgb, var(--pu-primary) 80%, black);
    --pu-secondary-light: #4a8bb8;
    /* Fallback */
    --pu-secondary-light: color-mix(in srgb, var(--pu-secondary) 80%, white);
    --pu-accent-light: #4dc0e6;
    /* Fallback */
    --pu-accent-light: color-mix(in srgb, var(--pu-accent) 80%, white);

    /* Status Colors with Fallbacks */
    --pu-success-light: #90d695;
    /* Fallback */
    --pu-success-light: color-mix(in srgb, var(--pu-success) 60%, white);
    --pu-error-light: #f08080;
    /* Fallback */
    --pu-error-light: color-mix(in srgb, var(--pu-error) 60%, white);

    /* UI Colors */
    --pu-success: #46b450;
    --pu-warning: #ffb900;
    --pu-error: #dc3232;
    --pu-info: var(--pu-accent);

    /* Neutral Colors */
    --pu-white: #ffffff;
    --pu-light-gray: #f8fafc;
    --pu-gray: #e2e8f0;
    --pu-dark-gray: #64748b;
    --pu-black: #1e293b;

    /* Typography */
    --pu-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --pu-font-size-sm: 14px;
    --pu-font-size-base: 16px;
    --pu-font-size-lg: 18px;
    --pu-font-size-xl: 20px;

    /* Spacing */
    --pu-spacing-xs: 4px;
    --pu-spacing-sm: 8px;
    --pu-spacing-md: 16px;
    --pu-spacing-lg: 24px;
    --pu-spacing-xl: 32px;

    /* Border Radius */
    --pu-radius-sm: 4px;
    --pu-radius-md: 8px;
    --pu-radius-lg: 12px;
    --pu-radius-xl: 16px;

    /* Floating Glass Shadows */
    --pu-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
    --pu-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
    --pu-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.08), 0 4px 6px rgba(0, 0, 0, 0.05);
    --pu-shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1), 0 8px 10px rgba(0, 0, 0, 0.04);
    --pu-shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 16px rgba(0, 0, 0, 0.08);
    --pu-shadow-float: 0 12px 24px rgba(0, 0, 0, 0.15), 0 4px 8px rgba(0, 0, 0, 0.1);
    --pu-shadow-hover: 0 16px 32px rgba(0, 0, 0, 0.18), 0 6px 12px rgba(0, 0, 0, 0.12);

    /* Transitions */
    --pu-transition-fast: 0.15s ease;
    --pu-transition-base: 0.3s ease;
    --pu-transition-slow: 0.5s ease;
}

/* 
==========================================================================
   TIER PRICING STYLES
   ========================================================================== */

.photo-uploader-pricing-section {
    background: var(--pu-white);
    border: 1px solid var(--pu-gray);
    border-radius: var(--pu-radius-md);
    padding: var(--pu-spacing-md);
    margin: var(--pu-spacing-md) 0;
    box-shadow: var(--pu-shadow-glass);
    transition: box-shadow var(--pu-transition-base);
}

.pricing-header {
    text-align: center;
    margin-bottom: var(--pu-spacing-sm);
}

.pricing-header h4 {
    font-size: var(--pu-font-size-lg);
    font-weight: 600;
    color: var(--pu-black);
    margin: 0 0 var(--pu-spacing-xs) 0;
}

.pricing-description {
    color: var(--pu-dark-gray);
    font-size: var(--pu-font-size-sm);
    margin: 0;
}

.photo-uploader-tier-options {
    display: flex;
    flex-wrap: wrap;
    gap: var(--pu-spacing-sm);
    margin-bottom: var(--pu-spacing-md);
    justify-content: center;
    align-items: stretch;
}

.photo-uploader-tier-option {
    background: linear-gradient(135deg, var(--pu-light-gray) 0%, var(--pu-white) 100%);
    border: 2px solid var(--pu-gray);
    border-radius: var(--pu-radius-md);
    padding: var(--pu-spacing-sm) var(--pu-spacing-md);
    cursor: pointer;
    transition: all var(--pu-transition-base);
    position: relative;
    overflow: hidden;
    min-height: 60px;
    min-width: 120px;
    flex: 0 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: var(--pu-shadow-md);
}

.photo-uploader-tier-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left var(--pu-transition-slow);
}

.photo-uploader-tier-option:hover::before {
    left: 100%;
}

.photo-uploader-tier-option:hover {
    border-color: var(--pu-primary);
    box-shadow: var(--pu-shadow-hover);
    transform: translateY(-2px);
}

.photo-uploader-tier-option.selected {
    background: linear-gradient(135deg, var(--pu-primary) 0%, var(--pu-accent) 100%);
    border-color: var(--pu-primary);
    color: var(--pu-white);
    box-shadow: 0 12px 30px rgba(0, 124, 186, 0.3);
    transform: translateY(-3px);
}

.photo-uploader-tier-option.selected .photo-uploader-tier-range,
.photo-uploader-tier-option.selected .photo-uploader-tier-price {
    color: var(--pu-white);
}

/* ==========================================================================
   BRANDING AND THEMING SUPPORT
   ========================================================================== */

/* Main Container Branding */
.photo-uploader-container {
    --border-color-hover: var(--pu-primary);
    --tier-hover-color: var(--pu-primary);
    --tier-selected-color: var(--pu-accent);
    --modal-accent-color: var(--pu-primary);
    --progress-color: var(--pu-accent);
}

/* Header Elements */
.photo-uploader-container .uploader-title {
    color: var(--pu-text-color);
    border-bottom: 2px solid var(--pu-primary);
    padding-bottom: var(--pu-spacing-xs);
}

.photo-uploader-container .uploader-description {
    color: var(--pu-dark-gray);
}

/* Button Branding */
.photo-uploader-container .btn-primary,
.photo-uploader-container .photo-uploader-submit-btn,
.photo-uploader-container .photo-uploader-upload-btn {
    background: linear-gradient(135deg, var(--pu-primary) 0%, var(--pu-accent) 100%);
    border-color: var(--pu-primary);
    color: var(--pu-white);
    transition: all var(--pu-transition-base);
    box-shadow: var(--pu-shadow-md);
}

.photo-uploader-container .btn-primary:hover,
.photo-uploader-container .photo-uploader-submit-btn:hover,
.photo-uploader-container .photo-uploader-upload-btn:hover {
    background: linear-gradient(135deg, var(--pu-primary-dark) 0%, var(--pu-primary) 100%);
    transform: translateY(-2px);
    box-shadow: var(--pu-shadow-hover);
}

.photo-uploader-container .btn-secondary,
.photo-uploader-container .photo-uploader-reset-btn {
    background: var(--pu-secondary);
    border-color: var(--pu-secondary);
    color: var(--pu-white);
}

.photo-uploader-container .btn-secondary:hover,
.photo-uploader-container .photo-uploader-reset-btn:hover {
    background: var(--pu-secondary-light);
    border-color: var(--pu-secondary-light);
}

/* Upload Area Branding */
.photo-uploader-container .photo-uploader-upload-area {
    border: 2px dashed var(--pu-gray);
    transition: all var(--pu-transition-base);
    box-shadow: var(--pu-shadow-sm);
}

.photo-uploader-container .photo-uploader-upload-area:hover,
.photo-uploader-container .photo-uploader-upload-area.dragover {
    border-color: var(--pu-primary);
    background: var(--pu-primary-light);
    box-shadow: var(--pu-shadow-md);
}

.photo-uploader-container .photo-uploader-upload-area .upload-icon {
    color: var(--pu-primary);
}

/* Gallery Item Branding */
.photo-uploader-container .photo-uploader-gallery-item {
    border: 2px solid var(--pu-gray);
    transition: all var(--pu-transition-base);
}

.photo-uploader-container .photo-uploader-gallery-item:hover {
    border-color: var(--pu-primary);
    box-shadow: var(--pu-shadow-float);
}

.photo-uploader-container .photo-uploader-gallery-item.selected {
    border-color: var(--pu-accent);
    box-shadow: var(--pu-shadow-glass);
}

/* Progress Bar Branding */
.photo-uploader-container .upload-progress,
.photo-uploader-container .processing-indicator {
    background: var(--pu-light-gray);
    border-radius: var(--pu-radius-sm);
    overflow: hidden;
}

.photo-uploader-container .upload-progress .progress-bar,
.photo-uploader-container .processing-indicator .progress-bar {
    background: linear-gradient(90deg, var(--pu-accent) 0%, var(--pu-primary) 100%);
    transition: width var(--pu-transition-base);
}

/* Modal Branding */
.photo-uploader-modal .modal-header {
    background: linear-gradient(135deg, var(--pu-primary) 0%, var(--pu-accent) 100%);
    color: var(--pu-white);
    box-shadow: var(--pu-shadow-md);
}

.photo-uploader-crop-modal .crop-controls {
    background: var(--pu-light-gray);
    border-top: 2px solid var(--pu-primary);
}

.photo-uploader-crop-modal .crop-btn-primary {
    background: var(--pu-primary);
    border-color: var(--pu-primary);
    color: var(--pu-white);
}

.photo-uploader-crop-modal .crop-btn-primary:hover {
    background: var(--pu-primary-dark);
}

/* Pricing Section Enhanced Branding */
.photo-uploader-pricing-section {
    border: 1px solid var(--pu-gray);
    border-top: 3px solid var(--pu-primary);
}

.pricing-header h4 {
    color: var(--pu-text-color);
    position: relative;
}

/* Tier Options Enhanced Branding */
.photo-uploader-tier-option {
    border: 2px solid var(--pu-gray);
    position: relative;
    overflow: hidden;
}

.photo-uploader-tier-option::before {
    background: linear-gradient(90deg, transparent, var(--pu-primary-light), transparent);
}

.photo-uploader-tier-option:hover {
    border-color: var(--pu-primary);
    box-shadow: 0 8px 25px rgba(0, 124, 186, 0.15);
}

.photo-uploader-tier-option.selected {
    background: linear-gradient(135deg, var(--pu-primary) 0%, var(--pu-accent) 100%);
    border-color: var(--pu-primary);
    box-shadow: 0 12px 30px rgba(0, 124, 186, 0.3);
}

/* Status Messages Branding */
.photo-uploader-container .status-message.success {
    background: var(--pu-success-light);
    border-color: var(--pu-success);
    color: var(--pu-success);
}

.photo-uploader-container .status-message.error {
    background: var(--pu-error-light);
    border-color: var(--pu-error);
    color: var(--pu-error);
}

.photo-uploader-container .status-message.info {
    background: var(--pu-accent-light);
    border-color: var(--pu-accent);
    color: var(--pu-primary);
}

/* Form Elements Branding */
.photo-uploader-container input[type="text"],
.photo-uploader-container input[type="email"],
.photo-uploader-container textarea,
.photo-uploader-container select {
    border: 1px solid var(--pu-gray);
    transition: border-color var(--pu-transition-fast);
    box-shadow: var(--pu-shadow-sm);
}

.photo-uploader-container input[type="text"]:focus,
.photo-uploader-container input[type="email"]:focus,
.photo-uploader-container textarea:focus,
.photo-uploader-container select:focus {
    border-color: var(--pu-primary);
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
    outline: none;
}

/* Loading Indicators Branding */
.photo-uploader-container .loading-spinner {
    border: 3px solid var(--pu-light-gray);
    border-top: 3px solid var(--pu-primary);
}

.photo-uploader-container .loading-dots::before {
    background: var(--pu-primary);
}

/* Notification Badges Branding */
.photo-uploader-container .notification-badge {
    background: var(--pu-accent);
    color: var(--pu-white);
}

.photo-uploader-container .notification-badge.error {
    background: var(--pu-error);
}

.photo-uploader-container .notification-badge.success {
    background: var(--pu-success);
}

/* Responsive Branding Adjustments */
@media (max-width: 768px) {
    .photo-uploader-container .uploader-title {
        border-bottom-width: 1px;
    }

    .pricing-header h4::after {
        width: 30px;
        height: 1px;
    }
}


.photo-uploader-tier-header {
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.photo-uploader-tier-range {
    font-size: var(--pu-font-size-sm);
    font-weight: 600;
    color: var(--pu-black);
    line-height: 1.1;
    margin: 0;
}

.photo-uploader-tier-price {
    font-size: var(--pu-font-size-base);
    font-weight: 700;
    color: var(--pu-primary);
    line-height: 1.1;
    margin: 0;
}

.pricing-summary {
    background: var(--pu-light-gray);
    border-radius: var(--pu-radius-md);
    padding: var(--pu-spacing-md);
    border-top: 2px solid var(--pu-primary);
    margin-top: var(--pu-spacing-sm);
}

.pricing-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--pu-spacing-sm);
}

.image-count-display,
.selected-tier-display,
.total-price-display {
    display: flex;
    align-items: center;
    gap: var(--pu-spacing-sm);
}

.pricing-info .label {
    font-weight: 600;
    color: var(--pu-dark-gray);
    font-size: var(--pu-font-size-base);
}

.image-count,
.selected-tier-name {
    font-weight: 700;
    color: var(--pu-black);
    font-size: var(--pu-font-size-lg);
}

.total-price-amount {
    font-weight: 700;
    color: var(--pu-primary);
    font-size: var(--pu-font-size-xl);
}

/* Mobile responsiveness for tier pricing */
@media (max-width: 768px) {
    .photo-uploader-tier-options {
        flex-wrap: wrap;
        justify-content: center;
    }

    .photo-uploader-tier-option {
        min-width: 100px;
        flex: 0 1 calc(50% - var(--pu-spacing-xs));
    }

    .pricing-info {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: var(--pu-spacing-xs);
    }

    .image-count-display,
    .selected-tier-display,
    .total-price-display {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .photo-uploader-tier-option {
        flex: 0 1 calc(33.333% - var(--pu-spacing-xs));
        min-width: 80px;
        font-size: var(--pu-font-size-sm);
    }
}

/* 
==========================================================================
   MAIN CONTAINER AND LAYOUT
   ========================================================================== */

.photo-uploader-container {
    max-width: 100%;
    margin: 0 auto;
    padding: var(--pu-spacing-lg);
    font-family: var(--pu-font-family);
    font-size: var(--pu-font-size-base);
    line-height: 1.6;
    color: var(--pu-black);
    background: var(--pu-white);
    border-radius: var(--pu-radius-lg);
    box-shadow: var(--pu-shadow-md);
    position: relative;
    overflow: hidden;
}

.photo-uploader-container * {
    box-sizing: border-box;
}

.photo-uploader-container *::before,
.photo-uploader-container *::after {
    box-sizing: border-box;
}

.photo-uploader-interface {
    display: flex;
    flex-direction: column;
    gap: var(--pu-spacing-lg);
    min-height: 400px;
}

.photo-uploader-header {
    text-align: center;
    margin-bottom: var(--pu-spacing-lg);
}

.title-section {
    margin-bottom: var(--pu-spacing-md);
}

.uploader-title {
    font-size: var(--pu-font-size-xl);
    font-weight: 700;
    color: var(--pu-primary);
    margin: 0 0 var(--pu-spacing-sm) 0;
    letter-spacing: -0.01em;
}

.uploader-description {
    font-size: var(--pu-font-size-base);
    color: var(--pu-dark-gray);
    margin: 0;
    line-height: 1.5;
}

/* Container state modifications */
.photo-uploader-container.has-images .uploader-title {
    font-size: var(--pu-font-size-lg);
    margin-bottom: var(--pu-spacing-xs);
}

.photo-uploader-container.has-images .uploader-description {
    font-size: var(--pu-font-size-sm);
    color: var(--pu-dark-gray);
}

.photo-uploader-container.has-images .photo-uploader-header {
    margin-bottom: var(--pu-spacing-md);
}

.photo-uploader-container.has-images .title-section {
    margin-bottom: var(--pu-spacing-sm);
}

/* ==========================================================================
   UPLOAD AREA COMPONENT - CONSOLIDATED SINGLE DEFINITIONS
   ========================================================================== */

.upload-area {
    border: 2px dashed var(--pu-gray);
    border-radius: var(--pu-radius-lg);
    padding: var(--pu-spacing-xl);
    text-align: center;
    background: linear-gradient(135deg, var(--pu-white) 0%, var(--pu-light-gray) 100%);
    transition: all var(--pu-transition-base);
    cursor: pointer;
    position: relative;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--pu-spacing-md);
    touch-action: manipulation;
    user-select: none;
}

.upload-area:hover {
    border-color: var(--pu-primary);
    background: linear-gradient(135deg, var(--pu-light-gray) 0%, var(--pu-white) 100%);
    transform: translateY(-2px);
    box-shadow: var(--pu-shadow-lg);
}

.upload-area.drag-over {
    border-color: var(--pu-accent);
    background: linear-gradient(135deg, rgba(0, 160, 210, 0.05) 0%, rgba(0, 124, 186, 0.1) 100%);
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(0, 124, 186, 0.2);
}

.upload-area.has-images {
    min-height: 120px;
    padding: var(--pu-spacing-lg);
    border-style: solid;
    border-width: 1px;
}

.upload-area.limits-updated {
    animation: limitsUpdated 0.8s ease-out;
}

.upload-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 49%, rgba(0, 124, 186, 0.1) 50%, transparent 51%);
    opacity: 0;
    transition: opacity var(--pu-transition-base);
    pointer-events: none;
}

.upload-area.drag-over::before {
    opacity: 1;
}

.upload-area:focus-within {
    outline: 2px solid var(--pu-accent);
    outline-offset: 2px;
}

.upload-icon {
    font-size: 48px;
    color: var(--pu-primary);
    margin-bottom: var(--pu-spacing-sm);
    transition: all var(--pu-transition-base);
}

.upload-area:hover .upload-icon {
    color: var(--pu-accent);
    transform: scale(1.1);
}

.upload-area.has-images .upload-icon {
    font-size: 24px;
    margin-bottom: var(--pu-spacing-xs);
}

.upload-text {
    font-size: var(--pu-font-size-lg);
    font-weight: 600;
    color: var(--pu-primary);
    margin: 0 0 var(--pu-spacing-xs) 0;
}

.upload-area.has-images .upload-text {
    font-size: var(--pu-font-size-base);
    font-weight: 500;
}

.upload-subtext {
    font-size: var(--pu-font-size-sm);
    color: var(--pu-dark-gray);
    margin: 0;
}

.upload-actions {
    display: flex;
    gap: var(--pu-spacing-md);
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.upload-button {
    background: linear-gradient(135deg, var(--pu-primary) 0%, var(--pu-secondary) 100%);
    color: var(--pu-white);
    border: none;
    padding: var(--pu-spacing-md) var(--pu-spacing-lg);
    border-radius: var(--pu-radius-md);
    font-size: var(--pu-font-size-base);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--pu-transition-base);
    box-shadow: var(--pu-shadow-sm);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: var(--pu-spacing-sm);
    min-height: 44px;
    position: relative;
    overflow: hidden;
}

.upload-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.upload-button:hover {
    background: linear-gradient(135deg, var(--pu-accent) 0%, var(--pu-primary) 100%);
    transform: translateY(-2px);
    box-shadow: var(--pu-shadow-md);
}

.upload-button:focus {
    outline: 2px solid var(--pu-accent);
    outline-offset: 2px;
}

.upload-button:active {
    transform: translateY(0);
    box-shadow: var(--pu-shadow-sm);
}

.upload-button:active::after {
    width: 300px;
    height: 300px;
}

/* Upload Drop Zone for Modal */
.upload-drop-zone {
    border: 3px dashed var(--pu-gray);
    border-radius: var(--pu-radius-xl);
    padding: var(--pu-spacing-xl);
    text-align: center;
    background: linear-gradient(135deg, var(--pu-white) 0%, var(--pu-light-gray) 100%);
    transition: all var(--pu-transition-base);
    cursor: pointer;
    position: relative;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--pu-spacing-lg);
}

.upload-drop-zone:hover {
    border-color: var(--pu-primary);
    background: linear-gradient(135deg, rgba(0, 124, 186, 0.08) 0%, rgba(0, 160, 210, 0.12) 50%, rgba(0, 124, 186, 0.08) 100%);
    transform: translateY(-3px);
    box-shadow: var(--pu-shadow-lg);
}

.upload-drop-zone.drag-over {
    border-color: var(--pu-primary);
    background: linear-gradient(135deg, rgba(0, 124, 186, 0.15) 0%, rgba(0, 160, 210, 0.2) 50%, rgba(0, 124, 186, 0.15) 100%);
    transform: scale(1.02);
    box-shadow: 0 0 30px rgba(0, 124, 186, 0.3);
}

.upload-drop-zone::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left var(--pu-transition-slow);
}

.upload-drop-zone:hover::before {
    opacity: 1;
}

.upload-drop-zone.drag-over::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(0, 124, 186, 0.1) 0%, transparent 70%);
    border-radius: inherit;
}

.drop-zone-icon {
    font-size: 72px;
    color: var(--pu-primary);
    margin-bottom: var(--pu-spacing-lg);
    transition: all var(--pu-transition-base);
    opacity: 0.8;
}

.upload-drop-zone:hover .drop-zone-icon {
    transform: scale(1.15) rotate(5deg);
    opacity: 1;
}

.upload-drop-zone.drag-over .drop-zone-icon {
    transform: scale(1.2) rotate(-5deg);
    animation: uploadPulse 1s infinite ease-in-out;
}

.drop-zone-title {
    font-size: var(--pu-font-size-xl);
    font-weight: 700;
    color: var(--pu-primary);
    margin: 0 0 var(--pu-spacing-sm) 0;
}

.drop-zone-subtitle {
    font-size: var(--pu-font-size-base);
    color: var(--pu-dark-gray);
    margin: 0 0 var(--pu-spacing-lg) 0;
    line-height: 1.5;
}

.drop-zone-button {
    background: linear-gradient(135deg, var(--pu-primary) 0%, var(--pu-secondary) 100%);
    color: var(--pu-white);
    border: none;
    padding: var(--pu-spacing-lg) var(--pu-spacing-xl);
    border-radius: var(--pu-radius-md);
    font-size: var(--pu-font-size-base);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--pu-transition-base);
    box-shadow: var(--pu-shadow-md);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: var(--pu-spacing-sm);
}

.drop-zone-button:hover {
    background: linear-gradient(135deg, var(--pu-secondary) 0%, #004a6b 100%);
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--pu-shadow-lg);
}

.drop-zone-button:active {
    transform: translateY(-1px) scale(1.02);
    box-shadow: var(--pu-shadow-md);
}

.drop-zone-button:focus {
    outline: 2px solid var(--pu-accent);
    outline-offset: 2px;
}

/* Upload Button Variants */
.upload-btn {
    padding: var(--pu-spacing-md) var(--pu-spacing-lg);
    border-radius: var(--pu-radius-md);
    font-size: var(--pu-font-size-base);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--pu-transition-base);
    box-shadow: var(--pu-shadow-sm);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: var(--pu-spacing-sm);
    border: none;
    min-height: 44px;
}

.upload-btn-primary {
    background: linear-gradient(135deg, var(--pu-primary) 0%, var(--pu-secondary) 100%);
    color: var(--pu-white);
}

.upload-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--pu-secondary) 0%, #004a6b 100%);
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--pu-shadow-md);
}

.upload-btn-secondary {
    background: linear-gradient(135deg, var(--pu-light-gray) 0%, var(--pu-gray) 100%);
    color: var(--pu-dark-gray);
    border: 1px solid var(--pu-gray);
}

.upload-btn-secondary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--pu-gray) 0%, var(--pu-dark-gray) 100%);
    border-color: var(--pu-dark-gray);
    color: var(--pu-white);
}

.upload-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.upload-btn:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
}

.upload-btn:focus {
    outline: 2px solid var(--pu-accent);
    outline-offset: 2px;
}

.upload-btn-icon {
    font-size: 18px;
    transition: transform var(--pu-transition-base);
}

.upload-btn:hover:not(:disabled) .upload-btn-icon {
    transform: scale(1.1);
}

/* Upload Animations */
@keyframes uploadPulse {

    0%,
    100% {
        transform: scale(1.2) rotate(-5deg);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.3) rotate(-5deg);
        opacity: 1;
    }
}

@keyframes limitsUpdated {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 124, 186, 0.7);
    }

    50% {
        transform: scale(1.02);
        box-shadow: 0 0 0 10px rgba(0, 124, 186, 0.3);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 124, 186, 0);
    }
}

/* ==
========================================================================
   GALLERY COMPONENT - MOBILE-FIRST DESIGN
   ========================================================================== */

.photo-uploader-gallery-section {
    margin-top: var(--pu-spacing-lg);
}

.photo-uploader-gallery-section.has-images {
    border-top: 1px solid var(--pu-gray);
    padding-top: var(--pu-spacing-lg);
}

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--pu-spacing-md);
    flex-wrap: wrap;
    gap: var(--pu-spacing-sm);
}

.gallery-count {
    font-size: var(--pu-font-size-sm);
    color: var(--pu-dark-gray);
    font-weight: 500;
}

.gallery-controls {
    display: flex;
    gap: var(--pu-spacing-sm);
    align-items: center;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--pu-spacing-md);
    margin-bottom: var(--pu-spacing-lg);
}

.gallery-grid:empty::after {
    content: 'No images uploaded yet';
    grid-column: 1 / -1;
    text-align: center;
    color: var(--pu-dark-gray);
    font-style: italic;
    padding: var(--pu-spacing-xl);
}

/* Gallery Item - Two-Part Layout for Mobile Compatibility */
.gallery-item {
    position: relative;
    background: var(--pu-white);
    border-radius: var(--pu-radius-md);
    overflow: hidden;
    box-shadow: var(--pu-shadow-sm);
    transition: all var(--pu-transition-base);
    display: flex;
    flex-direction: column;
    border: 2px solid transparent;
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 49%, rgba(0, 124, 186, 0.05) 50%, transparent 51%);
    opacity: 0;
    transition: opacity var(--pu-transition-base);
    pointer-events: none;
    z-index: 1;
}

/* Image Section - Flexible height for any aspect ratio */
.gallery-item-image-section {
    position: relative;
    flex: 1;
    min-height: 120px;
    max-height: 200px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pu-light-gray);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Changed from cover to contain for better aspect ratio handling */
    transition: transform var(--pu-transition-base);
    max-height: 100%;
}

/* Button Section - Always visible, compact height */
.gallery-item-buttons-section {
    flex: 0 0 auto;
    height: 48px;
    background: var(--pu-white);
    border-top: 1px solid var(--pu-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--pu-spacing-xs);
    gap: var(--pu-spacing-xs);
}

/* Gallery Action Buttons - Always visible on mobile */
.gallery-item-actions {
    display: flex;
    gap: var(--pu-spacing-xs);
    width: 100%;
    justify-content: center;
    align-items: center;
}

.gallery-action-btn {
    background: var(--pu-light-gray);
    border: 1px solid var(--pu-gray);
    border-radius: var(--pu-radius-sm);
    padding: var(--pu-spacing-xs);
    cursor: pointer;
    transition: all var(--pu-transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--pu-dark-gray);
    position: relative;
    touch-action: manipulation;
    user-select: none;
    box-shadow: var(--pu-shadow-sm);
}

.gallery-action-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.gallery-action-btn:hover {
    background: var(--pu-primary);
    color: var(--pu-white);
    border-color: var(--pu-primary);
    transform: scale(1.05);
    box-shadow: var(--pu-shadow-md);
}

.gallery-action-btn:active {
    transform: scale(0.95);
}

.gallery-action-btn.edit-btn:hover {
    background: var(--pu-accent);
    border-color: var(--pu-accent);
}

.gallery-action-btn.delete-btn:hover {
    background: var(--pu-error);
    border-color: var(--pu-error);
}

.gallery-action-btn.view-btn:hover {
    background: var(--pu-info);
    border-color: var(--pu-info);
}

/* Desktop Hover Effects - Only on desktop */
@media (min-width: 769px) and (hover: hover) {
    .gallery-item:hover {
        transform: translateY(-4px);
        box-shadow: var(--pu-shadow-lg);
        border-color: var(--pu-primary);
    }

    .gallery-item:hover::before {
        opacity: 1;
    }

    .gallery-item:hover img {
        transform: scale(1.05);
    }

    /* Hide buttons section on desktop hover, show overlay instead */
    .gallery-item:hover .gallery-item-buttons-section {
        opacity: 0;
    }

    /* Desktop overlay - only visible on hover */
    .gallery-item-overlay {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
        opacity: 0;
        transition: opacity var(--pu-transition-base);
        display: flex;
        align-items: flex-end;
        padding: var(--pu-spacing-md);
        z-index: 3;
        pointer-events: none;
    }

    .gallery-item:hover .gallery-item-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    .gallery-item-overlay .gallery-item-actions {
        pointer-events: auto;
    }

    .gallery-item-overlay .gallery-action-btn {
        background: rgba(255, 255, 255, 0.95);
        color: var(--pu-dark-gray);
        backdrop-filter: blur(8px);
        border: 1px solid rgba(255, 255, 255, 0.3);
        width: 40px;
        height: 40px;
    }

    .gallery-item-overlay .gallery-action-btn svg {
        width: 20px;
        height: 20px;
    }

    .gallery-item-overlay .gallery-action-btn {
        box-shadow: var(--pu-shadow-md);
    }
}

.gallery-action-btn:hover::before {
    opacity: 1;
}

.gallery-action-btn:focus {
    outline: 2px solid var(--pu-accent);
    outline-offset: 2px;
}

.gallery-action-btn:active {
    transform: scale(0.95);
}

.gallery-action-btn svg {
    width: 16px;
    height: 16px;
    fill: var(--pu-dark-gray);
    transition: fill var(--pu-transition-fast);
    position: relative;
    z-index: 1;
}

.gallery-action-btn.edit-btn:hover svg {
    fill: var(--pu-primary);
}

.gallery-action-btn.delete-btn:hover svg {
    fill: var(--pu-error);
}

.gallery-action-btn.view-btn:hover svg {
    fill: var(--pu-accent);
}

/* Gallery item states */
.gallery-item.selected {
    border: 2px solid var(--pu-accent);
    box-shadow: var(--pu-shadow-glass), 0 0 0 4px rgba(0, 160, 210, 0.2);
}

.gallery-item.selected .gallery-item-overlay {
    opacity: 0.8;
}

.gallery-item.loading {
    opacity: 0.6;
    pointer-events: none;
}

.gallery-item.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 2px solid var(--pu-light-gray);
    border-top: 2px solid var(--pu-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 3;
}

.gallery-item.error {
    border: 2px solid var(--pu-error);
    background: rgba(220, 50, 50, 0.1);
}

.gallery-item.edited::after {
    content: '✓';
    position: absolute;
    top: var(--pu-spacing-xs);
    right: var(--pu-spacing-xs);
    background: var(--pu-success);
    color: var(--pu-white);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    z-index: 3;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   PRICING DISPLAY COMPONENT
   ========================================================================== */

.tier-pricing-section {
    background: linear-gradient(135deg, var(--pu-white) 0%, var(--pu-light-gray) 100%);
    border: 1px solid var(--pu-gray);
    border-radius: var(--pu-radius-lg);
    padding: var(--pu-spacing-lg);
    margin: var(--pu-spacing-lg) 0;
    position: relative;
    overflow: hidden;
    transition: all var(--pu-transition-base);
    box-shadow: var(--pu-shadow-glass);
}

.tier-pricing-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--pu-primary) 0%, var(--pu-accent) 50%, var(--pu-secondary) 100%);
    border-radius: var(--pu-radius-lg) var(--pu-radius-lg) 0 0;
}

.tier-pricing-section:hover {
    transform: translateY(-3px);
    box-shadow: var(--pu-shadow-hover), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.tier-pricing-header {
    text-align: center;
    margin-bottom: var(--pu-spacing-lg);
}

.tier-pricing-title {
    font-size: var(--pu-font-size-xl);
    font-weight: 700;
    color: var(--pu-primary);
    margin: 0 0 var(--pu-spacing-xs) 0;
    letter-spacing: -0.01em;
}

.tier-pricing-subtitle {
    font-size: var(--pu-font-size-base);
    color: var(--pu-dark-gray);
    margin: 0;
    line-height: 1.5;
}

.tier-pricing-display {
    display: flex;
    flex-direction: column;
    gap: var(--pu-spacing-md);
}

.tier-pricing-strip {
    background: var(--pu-white);
    border: 1px solid var(--pu-gray);
    border-radius: var(--pu-radius-md);
    padding: var(--pu-spacing-md);
    transition: all var(--pu-transition-base);
}

.tier-pricing-strip:hover {
    border-color: var(--pu-primary);
    box-shadow: var(--pu-shadow-md);
    transform: translateY(-2px);
}

.tier-strip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--pu-spacing-sm);
}

.tier-strip-title {
    font-size: var(--pu-font-size-lg);
    font-weight: 600;
    color: var(--pu-primary);
    margin: 0;
    position: relative;
}

.tier-strip-title::before {
    content: '';
    position: absolute;
    left: -var(--pu-spacing-sm);
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: linear-gradient(to bottom, var(--pu-primary), var(--pu-accent));
    border-radius: 2px;
}

.tier-strip-subtitle {
    font-size: var(--pu-font-size-sm);
    color: var(--pu-dark-gray);
    margin: 0;
}

.tier-strip-container {
    display: flex;
    gap: var(--pu-spacing-sm);
    overflow-x: auto;
    padding: var(--pu-spacing-sm) 0;
    scrollbar-width: thin;
    scrollbar-color: var(--pu-gray) transparent;
}

.tier-strip-container::-webkit-scrollbar {
    height: 6px;
}

.tier-strip-container::-webkit-scrollbar-track {
    background: var(--pu-light-gray);
    border-radius: 3px;
}

.tier-strip-container::-webkit-scrollbar-thumb {
    background: var(--pu-gray);
    border-radius: 3px;
}

.tier-strip-container::-webkit-scrollbar-thumb:hover {
    background: var(--pu-dark-gray);
}

.tier-item {
    flex: 0 0 auto;
    min-width: 120px;
    background: var(--pu-light-gray);
    border: 2px solid transparent;
    border-radius: var(--pu-radius-md);
    padding: var(--pu-spacing-md);
    text-align: center;
    cursor: pointer;
    transition: all var(--pu-transition-base);
    position: relative;
    box-shadow: var(--pu-shadow-sm);
}

.tier-item:hover {
    background: var(--pu-white);
    border-color: var(--pu-primary);
    transform: translateY(-2px);
    box-shadow: var(--pu-shadow-md);
}

.tier-item:focus {
    outline: 2px solid var(--pu-accent);
    outline-offset: 2px;
}

.tier-item.active {
    background: linear-gradient(135deg, var(--pu-primary) 0%, var(--pu-secondary) 100%);
    border-color: var(--pu-primary);
    color: var(--pu-white);
    transform: translateY(-4px);
    box-shadow: var(--pu-shadow-lg);
}

.tier-quantity {
    font-size: var(--pu-font-size-lg);
    font-weight: 700;
    margin: 0 0 var(--pu-spacing-xs) 0;
}

.tier-unit {
    font-size: var(--pu-font-size-sm);
    opacity: 0.8;
    margin: 0;
}

.tier-price {
    font-size: var(--pu-font-size-xl);
    font-weight: 700;
    color: var(--pu-primary);
    margin: var(--pu-spacing-sm) 0 0 0;
}

.tier-item.active .tier-price {
    color: var(--pu-white);
}

.tier-savings {
    font-size: var(--pu-font-size-sm);
    color: var(--pu-success);
    font-weight: 600;
    margin: var(--pu-spacing-xs) 0 0 0;
}

.tier-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--pu-accent);
    color: var(--pu-white);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--pu-radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pricing-summary {
    background: var(--pu-white);
    border: 1px solid var(--pu-gray);
    border-radius: var(--pu-radius-md);
    padding: var(--pu-spacing-lg);
    margin-top: var(--pu-spacing-md);
    position: relative;
    transition: all var(--pu-transition-base);
    box-shadow: var(--pu-shadow-glass);
}

.pricing-summary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--pu-primary) 0%, var(--pu-accent) 100%);
    border-radius: var(--pu-radius-md) var(--pu-radius-md) 0 0;
}

.pricing-summary:hover {
    border-color: var(--pu-primary);
    box-shadow: var(--pu-shadow-md);
}

.pricing-details {
    display: flex;
    flex-direction: column;
    gap: var(--pu-spacing-sm);
}

.pricing-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--pu-spacing-xs) 0;
    border-bottom: 1px solid var(--pu-light-gray);
}

.pricing-detail:last-child {
    border-bottom: none;
    font-weight: 600;
    font-size: var(--pu-font-size-lg);
    color: var(--pu-primary);
}

.detail-label {
    color: var(--pu-dark-gray);
}

.detail-value {
    font-weight: 600;
    color: var(--pu-black);
}

.total-price {
    font-size: var(--pu-font-size-xl);
    font-weight: 700;
    color: var(--pu-primary);
}

.pricing-amount {
    font-size: var(--pu-font-size-xl);
    font-weight: 700;
    color: var(--pu-primary);
}

/* ========
==================================================================
   MODAL AND DIALOG COMPONENTS
   ========================================================================== */

.photo-uploader-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--pu-transition-base);
    backdrop-filter: blur(4px);
}

.photo-uploader-modal.active {
    opacity: 1;
    visibility: visible;
}

.photo-uploader-modal-content {
    background: var(--pu-white);
    border-radius: var(--pu-radius-lg);
    box-shadow: var(--pu-shadow-xl);
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform var(--pu-transition-base);
}

.photo-uploader-modal.active .photo-uploader-modal-content {
    transform: scale(1) translateY(0);
}



.crop-header {
    padding: var(--pu-spacing-lg);
    border-bottom: 1px solid var(--pu-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--pu-light-gray);
}

.crop-title {
    font-size: var(--pu-font-size-lg);
    font-weight: 600;
    color: var(--pu-primary);
    margin: 0;
}

.crop-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--pu-dark-gray);
    cursor: pointer;
    padding: var(--pu-spacing-xs);
    border-radius: var(--pu-radius-sm);
    transition: all var(--pu-transition-fast);
}

.crop-close:hover {
    background: var(--pu-gray);
    color: var(--pu-black);
}

.crop-body {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.crop-workspace {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--pu-spacing-lg);
    background: #f0f0f0;
    position: relative;
}

.crop-canvas {
    max-width: 100%;
    max-height: 100%;
    border: 1px solid var(--pu-gray);
    border-radius: var(--pu-radius-sm);
    box-shadow: var(--pu-shadow-md);
}

.crop-sidebar {
    width: 300px;
    background: var(--pu-white);
    border-left: 1px solid var(--pu-gray);
    padding: var(--pu-spacing-lg);
    overflow-y: auto;
}

.crop-controls {
    display: flex;
    flex-direction: column;
    gap: var(--pu-spacing-md);
}

.crop-footer {
    padding: var(--pu-spacing-lg);
    border-top: 1px solid var(--pu-gray);
    background: var(--pu-light-gray);
    display: flex;
    justify-content: flex-end;
    gap: var(--pu-spacing-md);
}

.confirmation-dialog-content {
    background: var(--pu-white);
    border-radius: var(--pu-radius-lg);
    box-shadow: var(--pu-shadow-xl);
    max-width: 500px;
    width: 90vw;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform var(--pu-transition-base);
}

.photo-uploader-confirmation-dialog.active .confirmation-dialog-content {
    transform: scale(1) translateY(0);
}

.confirmation-dialog-header {
    padding: var(--pu-spacing-lg);
    border-bottom: 1px solid var(--pu-gray);
    background: var(--pu-light-gray);
    text-align: center;
}

.confirmation-dialog-icon {
    font-size: 48px;
    color: var(--pu-warning);
    margin-bottom: var(--pu-spacing-sm);
}

.confirmation-dialog-body {
    padding: var(--pu-spacing-lg);
    text-align: center;
}

.confirmation-dialog-question {
    font-size: var(--pu-font-size-lg);
    font-weight: 600;
    color: var(--pu-black);
    margin: 0 0 var(--pu-spacing-md) 0;
}

.confirmation-dialog-summary {
    background: var(--pu-light-gray);
    border-radius: var(--pu-radius-md);
    padding: var(--pu-spacing-md);
    margin: var(--pu-spacing-md) 0;
}

.confirmation-dialog-footer {
    padding: var(--pu-spacing-lg);
    border-top: 1px solid var(--pu-gray);
    background: var(--pu-light-gray);
    display: flex;
    justify-content: center;
    gap: var(--pu-spacing-md);
}

.confirmation-btn {
    padding: var(--pu-spacing-md) var(--pu-spacing-lg);
    border: none;
    border-radius: var(--pu-radius-md);
    font-size: var(--pu-font-size-base);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--pu-transition-base);
    min-width: 120px;
    box-shadow: var(--pu-shadow-sm);
}

.confirmation-btn-cancel {
    background: var(--pu-gray);
    color: var(--pu-dark-gray);
}

.confirmation-btn-cancel:hover {
    background: var(--pu-dark-gray);
    color: var(--pu-white);
}

.confirmation-btn-confirm {
    background: linear-gradient(135deg, var(--pu-error) 0%, #b91c1c 100%);
    color: var(--pu-white);
}

.confirmation-btn-confirm:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    transform: translateY(-2px);
    box-shadow: var(--pu-shadow-md);
}

/* ====
======================================================================
   BUTTONS AND FORM COMPONENTS
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--pu-spacing-sm);
    padding: var(--pu-spacing-md) var(--pu-spacing-lg);
    border: none;
    border-radius: var(--pu-radius-md);
    font-size: var(--pu-font-size-base);
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--pu-transition-base);
    box-shadow: var(--pu-shadow-sm);
    min-height: 44px;
    position: relative;
    overflow: hidden;
}

.btn:focus {
    outline: 2px solid var(--pu-accent);
    outline-offset: 2px;
}

.btn:active {
    transform: translateY(1px);
    box-shadow: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--pu-primary) 0%, var(--pu-secondary) 100%);
    color: var(--pu-white);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--pu-accent) 0%, var(--pu-primary) 100%);
    transform: translateY(-2px);
    box-shadow: var(--pu-shadow-md);
}

.btn-secondary {
    background: var(--pu-gray);
    color: var(--pu-dark-gray);
}

.btn-secondary:hover {
    background: var(--pu-dark-gray);
    color: var(--pu-white);
    transform: translateY(-2px);
    box-shadow: var(--pu-shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--pu-primary);
    border: 2px solid var(--pu-primary);
    box-shadow: none;
}

.btn-outline:hover {
    background: var(--pu-primary);
    color: var(--pu-white);
    transform: translateY(-2px);
    box-shadow: var(--pu-shadow-md);
}

.btn-lg {
    padding: var(--pu-spacing-lg) var(--pu-spacing-xl);
    font-size: var(--pu-font-size-lg);
    min-height: 52px;
}

.submit-order-button {
    background: linear-gradient(135deg, var(--pu-success) 0%, #059669 100%);
    color: var(--pu-white);
    border: none;
    padding: var(--pu-spacing-lg) var(--pu-spacing-xl);
    border-radius: var(--pu-radius-md);
    font-size: var(--pu-font-size-lg);
    font-weight: 700;
    cursor: pointer;
    transition: all var(--pu-transition-base);
    box-shadow: var(--pu-shadow-md);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--pu-spacing-sm);
    min-height: 56px;
    position: relative;
    overflow: hidden;
}

.submit-order-button::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 var(--pu-transition-slow);
}

.submit-order-button:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-3px);
    box-shadow: var(--pu-shadow-lg);
}

.submit-order-button:hover::before {
    left: 100%;
}

.submit-order-button:focus {
    outline: 3px solid rgba(70, 180, 80, 0.3);
    outline-offset: 2px;
}

.submit-order-button:active {
    transform: translateY(-1px);
    box-shadow: var(--pu-shadow-md);
}

.submit-order-button:disabled {
    background: var(--pu-gray);
    color: var(--pu-dark-gray);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.add-more-button {
    background: linear-gradient(135deg, var(--pu-accent) 0%, var(--pu-primary) 100%);
    color: var(--pu-white);
    border: none;
    padding: var(--pu-spacing-sm) var(--pu-spacing-md);
    border-radius: var(--pu-radius-md);
    font-size: var(--pu-font-size-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--pu-transition-base);
    box-shadow: var(--pu-shadow-sm);
    display: inline-flex;
    align-items: center;
    gap: var(--pu-spacing-xs);
}

.add-more-button:hover {
    background: linear-gradient(135deg, var(--pu-primary) 0%, var(--pu-secondary) 100%);
    transform: translateY(-2px);
    box-shadow: var(--pu-shadow-md);
}

.help-button {
    background: var(--pu-light-gray);
    color: var(--pu-dark-gray);
    border: 1px solid var(--pu-gray);
    padding: var(--pu-spacing-sm);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    transition: all var(--pu-transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
}

.help-button:hover {
    background: var(--pu-primary);
    color: var(--pu-white);
    border-color: var(--pu-primary);
    transform: scale(1.1);
}

.help-button:focus {
    outline: 2px solid var(--pu-accent);
    outline-offset: 2px;
}

/* Form inputs */
.photo-uploader-container input,
.photo-uploader-container textarea {
    width: 100%;
    padding: var(--pu-spacing-md);
    border: 1px solid var(--pu-gray);
    border-radius: var(--pu-radius-md);
    font-size: var(--pu-font-size-base);
    font-family: inherit;
    transition: all var(--pu-transition-base);
    background: var(--pu-white);
}

.photo-uploader-container input:focus,
.photo-uploader-container textarea:focus {
    outline: none;
    border-color: var(--pu-primary);
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

/* Focus management */
.photo-uploader-container button:focus,
.photo-uploader-container .btn:focus,
.photo-uploader-container .gallery-item:focus {
    outline: 2px solid var(--pu-accent);
    outline-offset: 2px;
}

.upload-area:focus-within,
.gallery-item:focus-within {
    outline: 2px solid var(--pu-accent);
    outline-offset: 2px;
}

/* Loading states */
.photo-uploader-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--pu-light-gray);
    border-top: 2px solid var(--pu-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--pu-spacing-sm);
    padding: var(--pu-spacing-lg);
    color: var(--pu-dark-gray);
}

/* Status messages */
.status-message {
    padding: var(--pu-spacing-md) var(--pu-spacing-lg);
    border-radius: var(--pu-radius-md);
    margin: var(--pu-spacing-md) 0;
    display: flex;
    align-items: center;
    gap: var(--pu-spacing-sm);
    font-weight: 500;
    position: relative;
}

.status-message::before {
    content: '';
    width: 4px;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    border-radius: var(--pu-radius-md) 0 0 var(--pu-radius-md);
}

.status-message.success {
    background: rgba(70, 180, 80, 0.1);
    color: #166534;
    border: 1px solid rgba(70, 180, 80, 0.2);
}

.status-message.success::before {
    background: var(--pu-success);
}

.status-message.error {
    background: rgba(220, 50, 50, 0.1);
    color: #991b1b;
    border: 1px solid rgba(220, 50, 50, 0.2);
}

.status-message.error::before {
    background: var(--pu-error);
}

.status-message.warning {
    background: rgba(255, 185, 0, 0.1);
    color: #92400e;
    border: 1px solid rgba(255, 185, 0, 0.2);
}

.status-message.warning::before {
    background: var(--pu-warning);
}

.status-message.info {
    background: rgba(0, 160, 210, 0.1);
    color: #0c4a6e;
    border: 1px solid rgba(0, 160, 210, 0.2);
}

.status-message.info::before {
    background: var(--pu-info);
}

/* ==
========================================================================
   UTILITY CLASSES AND HELPERS
   ========================================================================== */

/* Visibility utilities */
.is-hidden {
    display: none !important;
}

.is-loading {
    opacity: 0.6;
    pointer-events: none;
}

.has-error {
    border-color: var(--pu-error) !important;
    box-shadow: 0 0 0 3px rgba(220, 50, 50, 0.1) !important;
}

/* Text utilities */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

/* Spacing utilities */
.mb-0 {
    margin-bottom: 0 !important;
}

.mb-1 {
    margin-bottom: var(--pu-spacing-xs) !important;
}

.mb-2 {
    margin-bottom: var(--pu-spacing-sm) !important;
}

.mb-3 {
    margin-bottom: var(--pu-spacing-md) !important;
}

.mb-4 {
    margin-bottom: var(--pu-spacing-lg) !important;
}

.mb-5 {
    margin-bottom: var(--pu-spacing-xl) !important;
}

.mt-0 {
    margin-top: 0 !important;
}

.mt-1 {
    margin-top: var(--pu-spacing-xs) !important;
}

.mt-2 {
    margin-top: var(--pu-spacing-sm) !important;
}

.mt-3 {
    margin-top: var(--pu-spacing-md) !important;
}

.mt-4 {
    margin-top: var(--pu-spacing-lg) !important;
}

.mt-5 {
    margin-top: var(--pu-spacing-xl) !important;
}

/* Flexbox utilities */
.d-flex {
    display: flex;
}

.flex-column {
    flex-direction: column;
}

.flex-row {
    flex-direction: row;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.align-center {
    align-items: center;
}

.flex-wrap {
    flex-wrap: wrap;
}

.flex-1 {
    flex: 1;
}

/* Animation keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes bounce {

    0%,
    20%,
    53%,
    80%,
    100% {
        transform: translate3d(0, 0, 0);
    }

    40%,
    43% {
        transform: translate3d(0, -8px, 0);
    }

    70% {
        transform: translate3d(0, -4px, 0);
    }

    90% {
        transform: translate3d(0, -2px, 0);
    }
}

/* Animation classes */
.fade-in {
    animation: fadeIn var(--pu-transition-base) ease forwards;
}

.slide-in {
    animation: slideIn var(--pu-transition-base) ease forwards;
}

.pulse {
    animation: pulse 2s infinite;
}

.bounce {
    animation: bounce 1s;
}

/* Theme variations */
.photo-uploader-container.theme-default {
    /* Default theme already applied above */
    background-color: var(--pu-white);
}

.photo-uploader-container.premium-theme {
    background: linear-gradient(135deg, var(--pu-white) 0%, var(--pu-light-gray) 100%);
    border: 2px solid var(--pu-primary);
}

.photo-uploader-container.premium-theme .uploader-title {
    background: linear-gradient(135deg, var(--pu-primary) 0%, var(--pu-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .photo-uploader-container {
        border: 2px solid;
    }

    .btn {
        border: 2px solid;
    }

    .gallery-item {
        border: 2px solid;
    }
}

/* Print styles */
@media print {
    .photo-uploader-container {
        box-shadow: none;
        border: 1px solid #000;
    }

    .btn,
    .upload-button,
    .submit-order-button {
        background: #fff !important;
        color: #000 !important;
        border: 1px solid #000 !important;
    }

    .photo-uploader-modal,
    .crop-modal {
        display: none !important;
    }
}

/* Focus visible for better keyboard navigation */
.btn:focus-visible,
.gallery-item:focus-visible,
.tier-item:focus-visible {
    outline: 3px solid var(--pu-accent);
    outline-offset: 2px;
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {

    .photo-uploader-container *,
    .photo-uploader-container *::before,
    .photo-uploader-container *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Dark mode support (if needed in future) */
@media (prefers-color-scheme: dark) {
    .photo-uploader-container {
        /* Dark mode styles would go here if needed */
        background-color: #2d2d2d;
        color: #ffffff;
    }
}

/* ======
====================================================================
   PROFESSIONAL TIER PRICING STYLES
   ========================================================================== */

/* Tier Pricing Container */
.photo-uploader-pricing-section {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: var(--pu-radius-xl);
    padding: var(--pu-spacing-xl);
    margin: var(--pu-spacing-xl) 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 124, 186, 0.1);
}

.pricing-header {
    text-align: center;
    margin-bottom: var(--pu-spacing-xl);
}

.pricing-header h4 {
    font-size: var(--pu-font-size-xl);
    font-weight: 700;
    color: var(--pu-black);
    margin: 0 0 var(--pu-spacing-sm) 0;
}

.pricing-description {
    color: var(--pu-dark-gray);
    font-size: var(--pu-font-size-base);
    margin: 0;
}

/* Professional Tier Options Grid - Compact */
.photo-uploader-tier-options {
    display: flex;
    flex-wrap: wrap;
    gap: var(--pu-spacing-sm);
    margin-bottom: var(--pu-spacing-md);
    padding: var(--pu-spacing-sm);
    justify-content: center;
    align-items: stretch;
}

/* Individual Tier Capsules - Compact */
.photo-uploader-tier-option {
    position: relative;
    padding: var(--pu-spacing-sm) var(--pu-spacing-md);
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border: 2px solid transparent;
    border-radius: var(--pu-radius-md);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.06),
        0 1px 2px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    min-height: 60px;
    min-width: 120px;
    flex: 0 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.photo-uploader-tier-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(145deg, var(--pu-primary), var(--pu-accent));
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 21px;
    z-index: 1;
}

.photo-uploader-tier-option:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow:
        0 20px 40px rgba(0, 124, 186, 0.2),
        0 8px 16px rgba(0, 124, 186, 0.1);
    border-color: var(--pu-primary);
}

.photo-uploader-tier-option:hover::before {
    opacity: 0.1;
}

.photo-uploader-tier-option.selected {
    background: linear-gradient(145deg, var(--pu-primary), var(--pu-accent));
    color: var(--pu-white);
    transform: translateY(-8px) scale(1.05);
    box-shadow:
        0 25px 50px rgba(0, 124, 186, 0.3),
        0 10px 20px rgba(0, 124, 186, 0.2);
    border-color: var(--pu-white);
}

.photo-uploader-tier-option.selected::before {
    opacity: 0;
}

.photo-uploader-tier-option.selected .photo-uploader-tier-header {
    position: relative;
    z-index: 2;
}

.photo-uploader-tier-option.available {
    cursor: pointer;
}

.photo-uploader-tier-option.insufficient {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.photo-uploader-tier-option.insufficient:hover {
    transform: none !important;
}

/* Tier Header Content */
.photo-uploader-tier-header {
    position: relative;
    z-index: 2;
}

.photo-uploader-tier-range {
    font-size: var(--pu-font-size-lg);
    font-weight: 700;
    margin-bottom: var(--pu-spacing-sm);
}

.photo-uploader-tier-price {
    font-size: var(--pu-font-size-xl);
    font-weight: 800;
    color: var(--pu-accent);
}

.photo-uploader-tier-option.selected .photo-uploader-tier-price {
    color: var(--pu-white);
}

/* Pricing Summary */
.pricing-summary {
    background: linear-gradient(135deg, var(--pu-white) 0%, #f8fafc 100%);
    border-radius: var(--pu-radius-lg);
    padding: var(--pu-spacing-lg);
    border: 2px solid var(--pu-gray);
    margin-top: var(--pu-spacing-lg);
}

.pricing-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--pu-spacing-md);
}

.image-count-display,
.selected-tier-display,
.total-price-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.image-count-display .label,
.selected-tier-display .label,
.total-price-display .label {
    font-size: var(--pu-font-size-sm);
    color: var(--pu-dark-gray);
    font-weight: 600;
    margin-bottom: var(--pu-spacing-xs);
}

.image-count,
.selected-tier-name,
.total-price-amount {
    font-size: var(--pu-font-size-lg);
    font-weight: 700;
    color: var(--pu-black);
}

.total-price-amount {
    color: var(--pu-accent);
    font-size: var(--pu-font-size-xl);
}

/* Submit Button Styles */
.submit-order-button {
    width: 100%;
    padding: var(--pu-spacing-lg) var(--pu-spacing-xl);
    background: linear-gradient(135deg, var(--pu-primary) 0%, var(--pu-secondary) 100%);
    color: var(--pu-white);
    border: none;
    border-radius: var(--pu-radius-lg);
    font-size: var(--pu-font-size-lg);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: var(--pu-spacing-xl);
    min-height: 56px;
    box-shadow: 0 4px 16px rgba(0, 124, 186, 0.3);
}

.submit-order-button:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--pu-secondary) 0%, #004a6b 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 124, 186, 0.4);
}

.submit-order-button:disabled {
    background: var(--pu-gray);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .photo-uploader-tier-options {
        grid-template-columns: 1fr;
        gap: var(--pu-spacing-md);
        padding: var(--pu-spacing-sm);
    }

    .photo-uploader-tier-option {
        min-height: 100px;
        padding: var(--pu-spacing-lg);
    }

    .pricing-info {
        flex-direction: column;
        text-align: center;
    }

    .image-count-display,
    .selected-tier-display,
    .total-price-display {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .photo-uploader-pricing-section {
        padding: var(--pu-spacing-lg);
        margin: var(--pu-spacing-lg) 0;
    }

    .photo-uploader-tier-option {
        padding: var(--pu-spacing-md);
        min-height: 80px;
    }

    .photo-uploader-tier-range {
        font-size: var(--pu-font-size-base);
    }

    .photo-uploader-tier-price {
        font-size: var(--pu-font-size-lg);
    }
}

/* =====
=====================================================================
   MODAL STYLES
   ========================================================================== */

/* Base Modal Styles */
.photo-uploader-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.photo-uploader-modal.active {
    opacity: 1;
    visibility: visible;
}

/* Image Viewer Modal */
.image-viewer-modal .image-viewer-content {
    background: var(--pu-white);
    border-radius: var(--pu-radius-lg);
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.image-viewer-modal.active .image-viewer-content {
    transform: scale(1) translateY(0);
}

.image-viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--pu-spacing-lg);
    border-bottom: 1px solid var(--pu-gray);
    background: var(--pu-light-gray);
}

.image-viewer-header h3 {
    margin: 0;
    font-size: var(--pu-font-size-lg);
    font-weight: 600;
    color: var(--pu-black);
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--pu-dark-gray);
    padding: var(--pu-spacing-xs);
    border-radius: var(--pu-radius-sm);
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--pu-error);
    color: var(--pu-white);
}

.image-viewer-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--pu-spacing-lg);
    background: #f8f9fa;
    min-height: 300px;
}

.image-viewer-body img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: var(--pu-radius-md);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.image-viewer-footer {
    padding: var(--pu-spacing-lg);
    background: var(--pu-light-gray);
    border-top: 1px solid var(--pu-gray);
    display: flex;
    gap: var(--pu-spacing-lg);
    flex-wrap: wrap;
}

.image-viewer-footer p {
    margin: 0;
    font-size: var(--pu-font-size-sm);
    color: var(--pu-dark-gray);
}

.processed-indicator {
    color: var(--pu-success) !important;
    font-weight: 600;
}

/* Confirmation Dialog Modal */
.photo-uploader-confirmation-dialog {
    z-index: 10001;
}

.confirmation-dialog-content {
    background: var(--pu-white);
    border-radius: var(--pu-radius-lg);
    max-width: 400px;
    width: 90%;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
}

.photo-uploader-confirmation-dialog.active .confirmation-dialog-content {
    transform: scale(1) translateY(0);
}

.confirmation-dialog-header {
    text-align: center;
    padding: var(--pu-spacing-xl) var(--pu-spacing-lg) var(--pu-spacing-lg);
    background: var(--pu-light-gray);
}

.confirmation-dialog-icon {
    font-size: 48px;
    margin-bottom: var(--pu-spacing-md);
}

.confirmation-dialog-body {
    padding: var(--pu-spacing-lg);
    text-align: center;
}

.confirmation-dialog-title {
    margin: 0 0 var(--pu-spacing-md) 0;
    font-size: var(--pu-font-size-lg);
    font-weight: 600;
    color: var(--pu-black);
}

.confirmation-dialog-question {
    margin: 0;
    color: var(--pu-dark-gray);
    font-size: var(--pu-font-size-base);
}

.confirmation-dialog-footer {
    display: flex;
    gap: var(--pu-spacing-md);
    padding: var(--pu-spacing-lg);
    background: var(--pu-light-gray);
}

.confirmation-btn {
    flex: 1;
    padding: var(--pu-spacing-md) var(--pu-spacing-lg);
    border: none;
    border-radius: var(--pu-radius-md);
    font-size: var(--pu-font-size-base);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.confirmation-btn-cancel {
    background: var(--pu-gray);
    color: var(--pu-dark-gray);
}

.confirmation-btn-cancel:hover {
    background: var(--pu-dark-gray);
    color: var(--pu-white);
}

.confirmation-btn-confirm {
    background: var(--pu-error);
    color: var(--pu-white);
}

.confirmation-btn-confirm:hover {
    background: #c53030;
}

/* Responsive Modal Styles */
@media (max-width: 768px) {
    .image-viewer-modal .image-viewer-content {
        max-width: 95vw;
        max-height: 95vh;
    }

    .image-viewer-header {
        padding: var(--pu-spacing-md);
    }

    .image-viewer-header h3 {
        font-size: var(--pu-font-size-base);
        max-width: 200px;
    }

    .image-viewer-body {
        padding: var(--pu-spacing-md);
        min-height: 200px;
    }

    .image-viewer-body img {
        max-height: 60vh;
    }

    .image-viewer-footer {
        padding: var(--pu-spacing-md);
        flex-direction: column;
        gap: var(--pu-spacing-sm);
    }

    .confirmation-dialog-content {
        width: 95%;
        max-width: 350px;
    }

    .confirmation-dialog-footer {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .image-viewer-body img {
        max-height: 50vh;
    }

    .confirmation-dialog-header {
        padding: var(--pu-spacing-lg) var(--pu-spacing-md) var(--pu-spacing-md);
    }

    .confirmation-dialog-icon {
        font-size: 36px;
    }
}

/*
 ==========================================================================
   CROP MODAL STYLES
   ========================================================================== */

/* Crop Modal */
.photo-uploader-crop-modal {
    z-index: 10001;
}

.crop-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--pu-white);
    border-radius: var(--pu-radius-lg);
    max-width: 90vw;
    max-height: 90vh;
    width: 900px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    resize: both;
    overflow: hidden;
    min-width: 600px;
    min-height: 500px;
}

.photo-uploader-crop-modal.active .crop-modal-content {
    animation: cropModalIn 0.3s ease;
}

@keyframes cropModalIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.crop-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--pu-spacing-lg);
    border-bottom: 1px solid var(--pu-gray);
    background: var(--pu-light-gray);
    user-select: none;
}

.crop-modal-header h3 {
    margin: 0;
    font-size: var(--pu-font-size-lg);
    font-weight: 600;
    color: var(--pu-black);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.crop-modal-controls {
    display: flex;
    gap: var(--pu-spacing-sm);
    align-items: center;
}

.crop-control-btn {
    background: var(--pu-primary);
    color: var(--pu-white);
    border: none;
    border-radius: var(--pu-radius-sm);
    padding: var(--pu-spacing-xs) var(--pu-spacing-sm);
    cursor: pointer;
    font-size: var(--pu-font-size-sm);
    transition: all 0.2s ease;
}

.crop-control-btn:hover {
    background: var(--pu-secondary);
}

.crop-modal-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: var(--pu-spacing-lg);
    background: #f8f9fa;
    overflow: hidden;
}

.crop-canvas-container {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    background: #ffffff;
    border-radius: var(--pu-radius-md);
    border: 2px solid var(--pu-gray);
    overflow: hidden;
}

.crop-canvas {
    display: block;
    max-width: 100%;
    max-height: 100%;
    cursor: crosshair;
}

.crop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.crop-selection {
    position: absolute;
    border: 2px solid var(--pu-primary);
    background: rgba(0, 124, 186, 0.1);
    cursor: move;
    pointer-events: all;
    min-width: 50px;
    min-height: 50px;
}

.crop-selection::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 1px dashed rgba(255, 255, 255, 0.8);
    pointer-events: none;
}

.crop-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--pu-primary);
    border: 2px solid var(--pu-white);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.crop-handle-nw {
    top: 0;
    left: 0;
    cursor: nw-resize;
}

.crop-handle-ne {
    top: 0;
    right: 0;
    cursor: ne-resize;
}

.crop-handle-sw {
    bottom: 0;
    left: 0;
    cursor: sw-resize;
}

.crop-handle-se {
    bottom: 0;
    right: 0;
    cursor: se-resize;
}

.crop-handle-n {
    top: 0;
    left: 50%;
    cursor: n-resize;
}

.crop-handle-s {
    bottom: 0;
    left: 50%;
    cursor: s-resize;
}

.crop-handle-e {
    top: 50%;
    right: 0;
    cursor: e-resize;
}

.crop-handle-w {
    top: 50%;
    left: 0;
    cursor: w-resize;
}

.crop-info-panel {
    margin-top: var(--pu-spacing-md);
    padding: var(--pu-spacing-md);
    background: var(--pu-white);
    border-radius: var(--pu-radius-md);
    border: 1px solid var(--pu-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--pu-font-size-sm);
    color: var(--pu-dark-gray);
}

.crop-dimensions {
    font-weight: 600;
}

.crop-aspect-info {
    color: var(--pu-primary);
    font-weight: 600;
}

.crop-modal-footer {
    display: flex;
    gap: var(--pu-spacing-md);
    padding: var(--pu-spacing-lg);
    background: var(--pu-light-gray);
    border-top: 1px solid var(--pu-gray);
    justify-content: flex-end;
}

.crop-btn {
    padding: var(--pu-spacing-md) var(--pu-spacing-lg);
    border: none;
    border-radius: var(--pu-radius-md);
    font-size: var(--pu-font-size-base);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
}

.crop-btn-cancel {
    background: var(--pu-gray);
    color: var(--pu-dark-gray);
}

.crop-btn-cancel:hover {
    background: var(--pu-dark-gray);
    color: var(--pu-white);
}

.crop-btn-apply {
    background: var(--pu-primary);
    color: var(--pu-white);
}

.crop-btn-apply:hover {
    background: var(--pu-secondary);
}

.crop-btn-apply:disabled {
    background: var(--pu-gray);
    cursor: not-allowed;
    opacity: 0.6;
}

/* Responsive Crop Modal */
@media (max-width: 768px) {
    .crop-modal-content {
        width: 95vw;
        height: 95vh;
        max-width: none;
        max-height: none;
        min-width: 300px;
        min-height: 400px;
        resize: none;
    }

    .crop-modal-header {
        padding: var(--pu-spacing-md);
    }

    .crop-modal-header h3 {
        font-size: var(--pu-font-size-base);
    }

    .crop-modal-body {
        padding: var(--pu-spacing-md);
    }

    .crop-canvas-container {
        min-height: 250px;
    }

    .crop-info-panel {
        flex-direction: column;
        gap: var(--pu-spacing-sm);
        text-align: center;
    }

    .crop-modal-footer {
        padding: var(--pu-spacing-md);
        flex-direction: column;
    }

    .crop-btn {
        width: 100%;
    }

    .crop-handle {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 480px) {
    .crop-modal-content {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
        min-width: auto;
        min-height: auto;
    }

    .crop-canvas-container {
        min-height: 200px;
    }

    .crop-handle {
        width: 20px;
        height: 20px;
    }

    .crop-modal-header {
        padding: var(--pu-spacing-sm) var(--pu-spacing-md);
    }

    .crop-modal-body {
        padding: var(--pu-spacing-sm);
    }

    .crop-modal-footer {
        padding: var(--pu-spacing-sm) var(--pu-spacing-md);
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .crop-handle {
        width: 24px;
        height: 24px;
    }

    .crop-selection {
        border-width: 3px;
    }

    .crop-control-btn {
        padding: var(--pu-spacing-sm) var(--pu-spacing-md);
        font-size: var(--pu-font-size-base);
    }
}

/* 
==========================================================================
   CROP MODAL STYLES
   ========================================================================== */

/* Crop Modal */
.photo-uploader-crop-modal {
    z-index: 10001;
}

.crop-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--pu-white);
    border-radius: var(--pu-radius-lg);
    max-width: 90vw;
    max-height: 90vh;
    width: 900px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    resize: both;
    overflow: hidden;
    min-width: 600px;
    min-height: 500px;
}

.photo-uploader-crop-modal.active .crop-modal-content {
    animation: cropModalIn 0.3s ease;
}

@keyframes cropModalIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.crop-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--pu-spacing-lg);
    border-bottom: 1px solid var(--pu-gray);
    background: var(--pu-light-gray);
    user-select: none;
}

.crop-modal-header h3 {
    margin: 0;
    font-size: var(--pu-font-size-lg);
    font-weight: 600;
    color: var(--pu-black);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.crop-modal-controls {
    display: flex;
    gap: var(--pu-spacing-sm);
    align-items: center;
}

.crop-control-btn {
    background: var(--pu-primary);
    color: var(--pu-white);
    border: none;
    border-radius: var(--pu-radius-sm);
    padding: var(--pu-spacing-xs) var(--pu-spacing-sm);
    cursor: pointer;
    font-size: var(--pu-font-size-sm);
    transition: all 0.2s ease;
}

.crop-control-btn:hover {
    background: var(--pu-secondary);
}

.crop-modal-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: var(--pu-spacing-lg);
    background: #f8f9fa;
    overflow: hidden;
}

.crop-canvas-container {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: var(--pu-radius-md);
    border: 2px solid var(--pu-gray);
    overflow: hidden;
    min-height: 400px;
}

.crop-canvas {
    display: block;
    border-radius: var(--pu-radius-sm);
}

.crop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

/* Image boundary indicator */
.crop-image-boundary {
    position: absolute;
    border: 2px dashed rgba(0, 124, 186, 0.3);
    pointer-events: none;
    z-index: 1;
}

/* Main crop selection area */
.crop-selection {
    position: absolute;
    border: 3px solid var(--pu-primary);
    background: rgba(0, 124, 186, 0.1);
    cursor: move;
    pointer-events: all;
    min-width: 50px;
    min-height: 50px;
    z-index: 3;
}

.crop-selection::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border: 2px dashed rgba(255, 255, 255, 0.9);
    pointer-events: none;
}

/* Bleeding area (10% smaller than crop area) */
.crop-bleeding-area {
    position: absolute;
    border: 2px solid rgba(220, 50, 50, 0.8);
    background: transparent;
    pointer-events: none;
    z-index: 2;
}

.crop-bleeding-area::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 1px dashed rgba(255, 255, 255, 0.7);
    pointer-events: none;
}

/* Crop handles */
.crop-handle {
    position: absolute;
    width: 14px;
    height: 14px;
    background: var(--pu-primary);
    border: 3px solid var(--pu-white);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    z-index: 4;
}

.crop-handle:hover {
    background: var(--pu-secondary);
    transform: translate(-50%, -50%) scale(1.2);
}

.crop-handle-nw {
    top: 0;
    left: 0;
    cursor: nw-resize;
}

.crop-handle-ne {
    top: 0;
    right: 0;
    cursor: ne-resize;
}

.crop-handle-sw {
    bottom: 0;
    left: 0;
    cursor: sw-resize;
}

.crop-handle-se {
    bottom: 0;
    right: 0;
    cursor: se-resize;
}

.crop-handle-n {
    top: 0;
    left: 50%;
    cursor: n-resize;
}

.crop-handle-s {
    bottom: 0;
    left: 50%;
    cursor: s-resize;
}

.crop-handle-e {
    top: 50%;
    right: 0;
    cursor: e-resize;
}

.crop-handle-w {
    top: 50%;
    left: 0;
    cursor: w-resize;
}

.crop-info-panel {
    margin-top: var(--pu-spacing-md);
    padding: var(--pu-spacing-md);
    background: var(--pu-white);
    border-radius: var(--pu-radius-md);
    border: 1px solid var(--pu-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--pu-font-size-sm);
    color: var(--pu-dark-gray);
}

.crop-dimensions {
    font-weight: 600;
}

.crop-aspect-info {
    color: var(--pu-primary);
    font-weight: 600;
}

.crop-modal-footer {
    display: flex;
    gap: var(--pu-spacing-md);
    padding: var(--pu-spacing-lg);
    background: var(--pu-light-gray);
    border-top: 1px solid var(--pu-gray);
    justify-content: flex-end;
}

.crop-btn {
    padding: var(--pu-spacing-md) var(--pu-spacing-lg);
    border: none;
    border-radius: var(--pu-radius-md);
    font-size: var(--pu-font-size-base);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
}

.crop-btn-cancel {
    background: var(--pu-gray);
    color: var(--pu-dark-gray);
}

.crop-btn-cancel:hover {
    background: var(--pu-dark-gray);
    color: var(--pu-white);
}

.crop-btn-apply {
    background: var(--pu-primary);
    color: var(--pu-white);
}

.crop-btn-apply:hover {
    background: var(--pu-secondary);
}

.crop-btn-apply:disabled {
    background: var(--pu-gray);
    cursor: not-allowed;
    opacity: 0.6;
}

/* Responsive Crop Modal */
@media (max-width: 768px) {
    .crop-modal-content {
        width: 95vw;
        height: 95vh;
        max-width: none;
        max-height: none;
        min-width: 300px;
        min-height: 400px;
        resize: none;
    }

    .crop-modal-header {
        padding: var(--pu-spacing-md);
    }

    .crop-modal-header h3 {
        font-size: var(--pu-font-size-base);
    }

    .crop-modal-body {
        padding: var(--pu-spacing-md);
    }

    .crop-canvas-container {
        min-height: 300px;
    }

    .crop-info-panel {
        flex-direction: column;
        gap: var(--pu-spacing-sm);
        text-align: center;
    }

    .crop-modal-footer {
        padding: var(--pu-spacing-md);
        flex-direction: column;
    }

    .crop-btn {
        width: 100%;
    }

    .crop-handle {
        width: 18px;
        height: 18px;
        border-width: 2px;
    }
}

@media (max-width: 480px) {
    .crop-modal-content {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
        min-width: auto;
        min-height: auto;
    }

    .crop-canvas-container {
        min-height: 250px;
    }

    .crop-handle {
        width: 22px;
        height: 22px;
        border-width: 3px;
    }

    .crop-modal-header {
        padding: var(--pu-spacing-sm) var(--pu-spacing-md);
    }

    .crop-modal-body {
        padding: var(--pu-spacing-sm);
    }

    .crop-modal-footer {
        padding: var(--pu-spacing-sm) var(--pu-spacing-md);
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .crop-handle {
        width: 26px;
        height: 26px;
        border-width: 3px;
    }

    .crop-selection {
        border-width: 4px;
    }

    .crop-bleeding-area {
        border-width: 3px;
    }

    .crop-control-btn {
        padding: var(--pu-spacing-sm) var(--pu-spacing-md);
        font-size: var(--pu-font-size-base);
    }
}

/* Legend for crop areas */
.crop-info-panel::after {
    content: "Blue: Crop Area • Red: Safe Area (90%)";
    font-size: var(--pu-font-size-sm);
    color: var(--pu-dark-gray);
    opacity: 0.8;
    position: absolute;
    bottom: -20px;
    left: 0;
    right: 0;
    text-align: center;
}

/* ==========================================================================
   MODAL BASE STYLES
   ========================================================================== */

/* Modal Overlay */
.photo-uploader-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.photo-uploader-modal.active {
    opacity: 1;
    visibility: visible;
}

.photo-uploader-modal .modal-content {
    background: var(--pu-white);
    border-radius: var(--pu-radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(-20px);
    transition: all 0.3s ease;
}

.photo-uploader-modal.active .modal-content {
    transform: scale(1) translateY(0);
}

.photo-uploader-modal .modal-header {
    padding: var(--pu-spacing-lg);
    border-bottom: 1px solid var(--pu-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.photo-uploader-modal .modal-header h3 {
    margin: 0;
    font-size: var(--pu-font-size-xl);
    color: var(--pu-black);
}

.photo-uploader-modal .modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--pu-dark-gray);
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.photo-uploader-modal .modal-close:hover {
    background: var(--pu-gray);
    color: var(--pu-black);
}

.photo-uploader-modal .modal-body {
    padding: var(--pu-spacing-lg);
}

.photo-uploader-modal .modal-footer {
    padding: var(--pu-spacing-lg);
    border-top: 1px solid var(--pu-gray);
    display: flex;
    justify-content: flex-end;
    gap: var(--pu-spacing-md);
}

/* ==========================================================================
   UPLOAD CONFIRMATION AND PROGRESS MODALS
   ========================================================================== */

/* Upload Confirmation Modal */
.upload-confirmation-modal .modal-content {
    max-width: 500px;
    width: 90%;
}

.confirmation-summary {
    text-align: center;
    padding: var(--pu-spacing-lg);
}

.confirmation-summary p {
    margin: var(--pu-spacing-sm) 0;
    font-size: var(--pu-font-size-base);
}

.image-status-summary {
    background: var(--pu-light-gray);
    border-radius: var(--pu-radius-md);
    padding: var(--pu-spacing-md);
    margin: var(--pu-spacing-md) 0;
    box-shadow: var(--pu-shadow-sm);
}

.image-status-summary p {
    margin: var(--pu-spacing-xs) 0;
    font-size: var(--pu-font-size-sm);
}

.pricing-summary {
    border-top: 1px solid var(--pu-gray);
    padding-top: var(--pu-spacing-md);
    margin-top: var(--pu-spacing-md);
}

/* Upload Progress Modal */
.upload-progress-modal .modal-content {
    max-width: 600px;
    width: 90%;
}

.progress-container {
    margin-bottom: var(--pu-spacing-lg);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--pu-gray);
    border-radius: var(--pu-radius-sm);
    overflow: hidden;
    margin-bottom: var(--pu-spacing-sm);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--pu-primary), var(--pu-accent));
    border-radius: var(--pu-radius-sm);
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    font-size: var(--pu-font-size-sm);
    color: var(--pu-dark-gray);
    font-weight: 500;
}

.task-list {
    display: flex;
    flex-direction: column;
    gap: var(--pu-spacing-sm);
}

.task-item {
    display: flex;
    align-items: center;
    gap: var(--pu-spacing-sm);
    padding: var(--pu-spacing-sm) var(--pu-spacing-md);
    background: var(--pu-light-gray);
    border-radius: var(--pu-radius-md);
    transition: all 0.3s ease;
}

.task-item.completed {
    background: rgba(70, 180, 80, 0.1);
    color: var(--pu-success);
}

.task-icon {
    font-size: var(--pu-font-size-lg);
    min-width: 24px;
    text-align: center;
}

.task-text {
    font-size: var(--pu-font-size-sm);
    font-weight: 500;
}

/* Success and Error Messages */
.success-message,
.error-message {
    text-align: center;
    padding: var(--pu-spacing-xl);
}

.success-icon,
.error-icon {
    font-size: 48px;
    margin-bottom: var(--pu-spacing-md);
}

.success-icon {
    color: var(--pu-success);
}

.error-icon {
    color: var(--pu-error);
}

.success-message h4,
.error-message h4 {
    margin: var(--pu-spacing-md) 0;
    font-size: var(--pu-font-size-xl);
}

.success-message p,
.error-message p {
    margin: var(--pu-spacing-sm) 0;
    color: var(--pu-dark-gray);
}

.success-actions,
.error-actions {
    display: flex;
    justify-content: center;
    gap: var(--pu-spacing-md);
    margin-top: var(--pu-spacing-lg);
}

/* Modal Button Styles */
.modal-footer .btn {
    padding: var(--pu-spacing-sm) var(--pu-spacing-lg);
    border: none;
    border-radius: var(--pu-radius-md);
    font-size: var(--pu-font-size-base);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--pu-primary);
    color: var(--pu-white);
}

.btn-primary:hover {
    background: var(--pu-secondary);
}

.btn-secondary {
    background: var(--pu-gray);
    color: var(--pu-dark-gray);
}

.btn-secondary:hover {
    background: var(--pu-dark-gray);
    color: var(--pu-white);
}

/* Responsive Design for Modals */
@media (max-width: 768px) {

    .upload-confirmation-modal .modal-content,
    .upload-progress-modal .modal-content {
        width: 95%;
        margin: var(--pu-spacing-md);
    }

    .confirmation-summary,
    .success-message,
    .error-message {
        padding: var(--pu-spacing-md);
    }

    .success-actions,
    .error-actions {
        flex-direction: column;
    }

    .modal-footer {
        flex-direction: column;
        gap: var(--pu-spacing-sm);
    }

    .modal-footer .btn {
        width: 100%;
    }
}

/* =
=========================================================================
   INTERACTIVE CROP MODAL STYLES
   ========================================================================== */

.photo-uploader-crop-modal {
    z-index: 10001;
}

.crop-modal-content {
    background: var(--pu-white);
    border-radius: var(--pu-radius-lg);
    box-shadow: var(--pu-shadow-xl);
    max-width: 90vw;
    max-height: 90vh;
    width: 700px;
    display: flex;
    flex-direction: column;
}

.crop-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--pu-spacing-md);
    border-bottom: 1px solid var(--pu-gray);
}

.crop-modal-title {
    font-size: var(--pu-font-size-lg);
    font-weight: 600;
    color: var(--pu-black);
    margin: 0;
}

.crop-modal-controls {
    display: flex;
    gap: var(--pu-spacing-sm);
}

.crop-control-btn,
.modal-close-btn {
    background: none;
    border: 1px solid var(--pu-gray);
    border-radius: var(--pu-radius-sm);
    padding: var(--pu-spacing-xs) var(--pu-spacing-sm);
    cursor: pointer;
    font-size: var(--pu-font-size-base);
    transition: var(--pu-transition-fast);
}

.crop-control-btn:hover,
.modal-close-btn:hover {
    background: var(--pu-light-gray);
    border-color: var(--pu-primary);
}

.crop-modal-body {
    padding: var(--pu-spacing-md);
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--pu-spacing-md);
}

.crop-canvas-container {
    position: relative;
    background: #f0f0f0;
    border-radius: var(--pu-radius-sm);
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.crop-canvas {
    display: block;
    background: var(--pu-white);
}

.crop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.crop-selection {
    pointer-events: all;
    background: rgba(0, 124, 186, 0.1);
    border: 2px solid var(--pu-primary);
    box-shadow: 0 0 0 2000px rgba(0, 0, 0, 0.3);
    transition: none;
}

.crop-selection:hover {
    border-color: var(--pu-accent);
}

.crop-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--pu-primary);
    border: 2px solid var(--pu-white);
    border-radius: 50%;
    box-shadow: var(--pu-shadow-sm);
    transition: var(--pu-transition-fast);
    touch-action: none;
}

.crop-handle:hover {
    background: var(--pu-accent);
    transform: scale(1.2);
}

.crop-handle:active {
    background: var(--pu-secondary);
    transform: scale(1.1);
}

/* Handle positioning */
.crop-handle-nw {
    top: -6px;
    left: -6px;
    cursor: nw-resize;
}

.crop-handle-ne {
    top: -6px;
    right: -6px;
    cursor: ne-resize;
}

.crop-handle-sw {
    bottom: -6px;
    left: -6px;
    cursor: sw-resize;
}

.crop-handle-se {
    bottom: -6px;
    right: -6px;
    cursor: se-resize;
}

.crop-handle-n {
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    cursor: n-resize;
}

.crop-handle-s {
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    cursor: s-resize;
}

.crop-handle-e {
    top: 50%;
    right: -6px;
    transform: translateY(-50%);
    cursor: e-resize;
}

.crop-handle-w {
    top: 50%;
    left: -6px;
    transform: translateY(-50%);
    cursor: w-resize;
}

.crop-bleeding-area {
    border: 2px dashed #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    pointer-events: none;
}

.crop-info-panel {
    background: var(--pu-light-gray);
    border-radius: var(--pu-radius-sm);
    padding: var(--pu-spacing-sm);
    text-align: center;
}

.crop-dimensions,
.crop-aspect-info {
    font-size: var(--pu-font-size-sm);
    color: var(--pu-dark-gray);
    margin: var(--pu-spacing-xs) 0;
}

.crop-width,
.crop-height {
    font-weight: 600;
    color: var(--pu-primary);
}

.crop-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--pu-spacing-sm);
    padding: var(--pu-spacing-md);
    border-top: 1px solid var(--pu-gray);
}

.crop-btn {
    padding: var(--pu-spacing-sm) var(--pu-spacing-md);
    border: none;
    border-radius: var(--pu-radius-sm);
    font-size: var(--pu-font-size-base);
    font-weight: 500;
    cursor: pointer;
    transition: var(--pu-transition-fast);
}

.crop-cancel-btn {
    background: var(--pu-gray);
    color: var(--pu-dark-gray);
}

.crop-cancel-btn:hover {
    background: var(--pu-dark-gray);
    color: var(--pu-white);
}

.crop-apply-btn {
    background: var(--pu-primary);
    color: var(--pu-white);
}

.crop-apply-btn:hover {
    background: var(--pu-secondary);
}

/* Mobile responsiveness for crop modal */
@media (max-width: 768px) {
    .crop-modal-content {
        width: 95vw;
        max-height: 95vh;
    }

    .crop-canvas-container {
        width: 100% !important;
        height: 300px !important;
    }

    .crop-handle {
        width: 16px;
        height: 16px;
        border-width: 3px;
    }

    .crop-handle-nw {
        top: -8px;
        left: -8px;
    }

    .crop-handle-ne {
        top: -8px;
        right: -8px;
    }

    .crop-handle-sw {
        bottom: -8px;
        left: -8px;
    }

    .crop-handle-se {
        bottom: -8px;
        right: -8px;
    }

    .crop-handle-n {
        top: -8px;
    }

    .crop-handle-s {
        bottom: -8px;
    }

    .crop-handle-e {
        right: -8px;
    }

    .crop-handle-w {
        left: -8px;
    }

    .crop-modal-footer {
        flex-direction: column;
    }

    .crop-btn {
        width: 100%;
        padding: var(--pu-spacing-md);
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .crop-handle {
        width: 20px;
        height: 20px;
    }

    .crop-selection {
        border-width: 3px;
    }
}

/* ==========================================================================
   CONFIRMATION MODAL STYLES (UPDATED)
   ========================================================================== */

.photo-uploader-confirmation-dialog {
    z-index: 10002;
}

.confirmation-dialog-content {
    background: var(--pu-white);
    border-radius: var(--pu-radius-lg);
    box-shadow: var(--pu-shadow-xl);
    max-width: 400px;
    width: 90vw;
    text-align: center;
}

.confirmation-dialog-header {
    padding: var(--pu-spacing-lg) var(--pu-spacing-md) var(--pu-spacing-sm);
}

.confirmation-dialog-icon {
    font-size: 48px;
    margin-bottom: var(--pu-spacing-sm);
}

.confirmation-dialog-body {
    padding: 0 var(--pu-spacing-md) var(--pu-spacing-md);
}

.confirmation-dialog-title {
    font-size: var(--pu-font-size-lg);
    font-weight: 600;
    color: var(--pu-black);
    margin: 0 0 var(--pu-spacing-sm) 0;
}

.confirmation-dialog-question {
    color: var(--pu-dark-gray);
    margin: 0;
    line-height: 1.5;
}

.confirmation-dialog-footer {
    display: flex;
    gap: var(--pu-spacing-sm);
    padding: var(--pu-spacing-md);
    border-top: 1px solid var(--pu-gray);
}

.confirmation-btn {
    flex: 1;
    padding: var(--pu-spacing-sm) var(--pu-spacing-md);
    border: none;
    border-radius: var(--pu-radius-sm);
    font-size: var(--pu-font-size-base);
    font-weight: 500;
    cursor: pointer;
    transition: var(--pu-transition-fast);
}

.confirmation-btn-cancel {
    background: var(--pu-gray);
    color: var(--pu-dark-gray);
}

.confirmation-btn-cancel:hover {
    background: var(--pu-dark-gray);
    color: var(--pu-white);
}

.confirmation-btn-confirm {
    background: var(--pu-error);
    color: var(--pu-white);
}

.confirmation-btn-confirm:hover {
    background: #c23232;
}

/* ==========================================================================
   CROP MODAL STYLES - ACCURATE POSITIONING & MOBILE SUPPORT
   ========================================================================== */

.photo-uploader-crop-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--pu-transition-base);
    backdrop-filter: blur(4px);
}

.photo-uploader-crop-modal.active {
    opacity: 1;
    visibility: visible;
}

.crop-modal-content {
    background: var(--pu-white);
    border-radius: var(--pu-radius-lg);
    box-shadow: var(--pu-shadow-xl);
    max-width: 95vw;
    max-height: 95vh;
    width: 800px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.crop-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--pu-spacing-lg);
    border-bottom: 1px solid var(--pu-gray);
    background: linear-gradient(135deg, var(--pu-primary) 0%, var(--pu-accent) 100%);
    color: var(--pu-white);
}

.crop-modal-header h3 {
    margin: 0;
    font-size: var(--pu-font-size-lg);
    font-weight: 600;
    color: var(--pu-white);
}

.crop-modal-header .modal-close {
    background: rgba(255, 255, 255, 0.2);
    color: var(--pu-white);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    transition: all var(--pu-transition-fast);
}

.crop-modal-header .modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.crop-modal-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: var(--pu-spacing-lg);
    background: #f8f9fa;
    overflow: hidden;
}

.crop-instructions {
    text-align: center;
    margin-bottom: var(--pu-spacing-md);
    padding: var(--pu-spacing-sm);
    background: var(--pu-white);
    border-radius: var(--pu-radius-sm);
    border-left: 4px solid var(--pu-primary);
}

.crop-instructions p {
    margin: 0;
    font-size: var(--pu-font-size-sm);
    color: var(--pu-dark-gray);
    font-weight: 500;
}

.crop-canvas-container {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: var(--pu-radius-md);
    border: 2px solid var(--pu-gray);
    overflow: hidden;
    min-height: 400px;
    max-height: 500px;
}

.crop-canvas {
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: var(--pu-radius-sm);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.crop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
}

/* Main crop selection area - FIXED POSITIONING */
.crop-selection {
    position: absolute;
    border: 3px solid var(--pu-primary);
    background: rgba(0, 124, 186, 0.1);
    cursor: move;
    pointer-events: all;
    min-width: 50px;
    min-height: 50px;
    z-index: 3;
    box-shadow: 0 0 0 2000px rgba(0, 0, 0, 0.4);
}

.crop-selection::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border: 2px dashed rgba(255, 255, 255, 0.9);
    pointer-events: none;
    border-radius: 2px;
}

/* Bleeding area (90% of crop area) - FIXED POSITIONING */
.crop-bleeding-area {
    position: absolute;
    border: 2px dashed rgba(220, 50, 50, 0.8);
    background: transparent;
    pointer-events: none;
    z-index: 2;
}

.crop-bleeding-area::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 1px dashed rgba(255, 255, 255, 0.7);
    pointer-events: none;
    border-radius: 2px;
}

/* Crop handles - IMPROVED POSITIONING */
.crop-handle {
    position: absolute;
    width: 14px;
    height: 14px;
    background: var(--pu-primary);
    border: 3px solid var(--pu-white);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 4;
    transition: all var(--pu-transition-fast);
}

.crop-handle:hover {
    background: var(--pu-accent);
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.4);
}

.crop-handle:active {
    background: var(--pu-secondary);
    transform: scale(1.1);
}

/* Handle positioning - PRECISE COORDINATES */
.crop-handle-nw {
    top: -7px;
    left: -7px;
    cursor: nw-resize;
}

.crop-handle-ne {
    top: -7px;
    right: -7px;
    cursor: ne-resize;
}

.crop-handle-sw {
    bottom: -7px;
    left: -7px;
    cursor: sw-resize;
}

.crop-handle-se {
    bottom: -7px;
    right: -7px;
    cursor: se-resize;
}

.crop-handle-n {
    top: -7px;
    left: 50%;
    transform: translateX(-50%);
    cursor: n-resize;
}

.crop-handle-s {
    bottom: -7px;
    left: 50%;
    transform: translateX(-50%);
    cursor: s-resize;
}

.crop-handle-e {
    top: 50%;
    right: -7px;
    transform: translateY(-50%);
    cursor: e-resize;
}

.crop-handle-w {
    top: 50%;
    left: -7px;
    transform: translateY(-50%);
    cursor: w-resize;
}

.crop-info {
    margin-top: var(--pu-spacing-md);
    padding: var(--pu-spacing-sm);
    background: var(--pu-white);
    border-radius: var(--pu-radius-sm);
    text-align: center;
    font-size: var(--pu-font-size-sm);
    color: var(--pu-dark-gray);
    border: 1px solid var(--pu-gray);
}

.crop-info span {
    font-weight: 600;
    color: var(--pu-primary);
}

.crop-modal-footer {
    display: flex;
    gap: var(--pu-spacing-md);
    padding: var(--pu-spacing-lg);
    background: var(--pu-light-gray);
    border-top: 1px solid var(--pu-gray);
    justify-content: flex-end;
}

.crop-btn {
    padding: var(--pu-spacing-md) var(--pu-spacing-xl);
    border: none;
    border-radius: var(--pu-radius-md);
    font-size: var(--pu-font-size-base);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--pu-transition-base);
    min-width: 120px;
    position: relative;
    overflow: hidden;
}

.crop-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.crop-btn:active::after {
    width: 300px;
    height: 300px;
}

.crop-btn-secondary {
    background: var(--pu-gray);
    color: var(--pu-dark-gray);
}

.crop-btn-secondary:hover {
    background: var(--pu-dark-gray);
    color: var(--pu-white);
    transform: translateY(-2px);
    box-shadow: var(--pu-shadow-md);
}

.crop-btn-primary {
    background: linear-gradient(135deg, var(--pu-primary) 0%, var(--pu-accent) 100%);
    color: var(--pu-white);
    box-shadow: var(--pu-shadow-md);
}

.crop-btn-primary:hover {
    background: linear-gradient(135deg, var(--pu-accent) 0%, var(--pu-primary) 100%);
    transform: translateY(-2px);
    box-shadow: var(--pu-shadow-lg);
}

.crop-btn-primary:disabled {
    background: var(--pu-gray);
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
}

/* Mobile responsiveness for crop modal - ENHANCED */
@media (max-width: 768px) {
    .crop-modal-content {
        width: 95vw;
        height: 95vh;
        max-width: none;
        max-height: none;
    }

    .crop-modal-header {
        padding: var(--pu-spacing-md);
    }

    .crop-modal-header h3 {
        font-size: var(--pu-font-size-base);
    }

    .crop-modal-body {
        padding: var(--pu-spacing-md);
    }

    .crop-canvas-container {
        min-height: 300px;
        max-height: 400px;
    }

    .crop-modal-footer {
        padding: var(--pu-spacing-md);
        flex-direction: column;
    }

    .crop-btn {
        width: 100%;
        min-width: auto;
    }

    .crop-handle {
        width: 18px;
        height: 18px;
        border-width: 2px;
    }

    .crop-handle-nw,
    .crop-handle-ne,
    .crop-handle-sw,
    .crop-handle-se {
        top: -9px;
        left: -9px;
    }

    .crop-handle-ne,
    .crop-handle-se {
        left: auto;
        right: -9px;
    }

    .crop-handle-sw,
    .crop-handle-se {
        top: auto;
        bottom: -9px;
    }

    .crop-handle-n,
    .crop-handle-s {
        top: -9px;
    }

    .crop-handle-s {
        top: auto;
        bottom: -9px;
    }

    .crop-handle-e,
    .crop-handle-w {
        right: -9px;
    }

    .crop-handle-w {
        right: auto;
        left: -9px;
    }
}

@media (max-width: 480px) {
    .crop-modal-content {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
    }

    .crop-canvas-container {
        min-height: 250px;
        max-height: 300px;
    }

    .crop-handle {
        width: 22px;
        height: 22px;
        border-width: 3px;
    }

    .crop-handle-nw,
    .crop-handle-ne,
    .crop-handle-sw,
    .crop-handle-se,
    .crop-handle-n,
    .crop-handle-s,
    .crop-handle-e,
    .crop-handle-w {
        top: -11px;
        left: -11px;
    }

    .crop-handle-ne,
    .crop-handle-se,
    .crop-handle-e {
        left: auto;
        right: -11px;
    }

    .crop-handle-sw,
    .crop-handle-se,
    .crop-handle-s {
        top: auto;
        bottom: -11px;
    }

    .crop-handle-w {
        right: auto;
        left: -11px;
    }
}

/* Touch-friendly improvements - ENHANCED */
@media (hover: none) and (pointer: coarse) {
    .crop-handle {
        width: 26px;
        height: 26px;
        border-width: 3px;
    }

    .crop-selection {
        border-width: 4px;
    }

    .crop-bleeding-area {
        border-width: 3px;
    }

    .crop-btn {
        padding: var(--pu-spacing-lg) var(--pu-spacing-xl);
        font-size: var(--pu-font-size-lg);
    }
}

/* Animation for crop modal appearance */
@keyframes cropModalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.photo-uploader-crop-modal.active .crop-modal-content {
    animation: cropModalSlideIn 0.3s ease-out;
}

.crop-modal-header {
    background: linear-gradient(135deg, var(--pu-primary) 0%, var(--pu-accent) 100%);
    color: var(--pu-white);
    padding: var(--pu-spacing-md) var(--pu-spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: grab;
    user-select: none;
}

.crop-modal-header:active {
    cursor: grabbing;
}

.crop-modal-header h3 {
    margin: 0;
    font-size: var(--pu-font-size-lg);
    font-weight: 600;
}

.crop-modal-header .modal-close {
    background: none;
    border: none;
    color: var(--pu-white);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--pu-radius-sm);
    transition: background-color var(--pu-transition-fast);
}

.crop-modal-header .modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.crop-modal-body {
    padding: var(--pu-spacing-lg);
    display: flex;
    flex-direction: column;
    gap: var(--pu-spacing-md);
    flex: 1;
    overflow: hidden;
}

.crop-instructions {
    text-align: center;
    color: var(--pu-dark-gray);
    font-size: var(--pu-font-size-sm);
    padding: var(--pu-spacing-sm);
    background: var(--pu-light-gray);
    border-radius: var(--pu-radius-sm);
    border-left: 3px solid var(--pu-primary);
}

.crop-canvas-container {
    position: relative;
    margin: 0 auto;
    border: 2px solid var(--pu-gray);
    border-radius: var(--pu-radius-md);
    overflow: hidden;
    background: var(--pu-light-gray);
    box-shadow: var(--pu-shadow-md);
}

.crop-canvas {
    display: block;
    max-width: 100%;
    max-height: 100%;
    touch-action: none;
    user-select: none;
}

.crop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.crop-selection {
    position: absolute;
    border: 2px solid var(--pu-white);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    pointer-events: all;
    cursor: move;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(1px);
}

.crop-bleeding-area {
    position: absolute;
    border: 2px dashed #ff4444;
    pointer-events: none;
    background: rgba(255, 68, 68, 0.1);
    z-index: 5;
}

.crop-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--pu-white);
    border: 2px solid var(--pu-primary);
    border-radius: 2px;
    pointer-events: all;
    z-index: 15;
    box-shadow: var(--pu-shadow-sm);
    transition: all var(--pu-transition-fast);
}

.crop-handle:hover {
    background: var(--pu-primary);
    transform: scale(1.2);
    box-shadow: var(--pu-shadow-md);
}

/* Handle cursors */
.crop-handle-nw {
    cursor: nw-resize;
}

.crop-handle-n {
    cursor: n-resize;
}

.crop-handle-ne {
    cursor: ne-resize;
}

.crop-handle-w {
    cursor: w-resize;
}

.crop-handle-e {
    cursor: e-resize;
}

.crop-handle-sw {
    cursor: sw-resize;
}

.crop-handle-s {
    cursor: s-resize;
}

.crop-handle-se {
    cursor: se-resize;
}

.crop-info {
    text-align: center;
    color: var(--pu-dark-gray);
    font-size: var(--pu-font-size-sm);
    padding: var(--pu-spacing-sm);
    background: var(--pu-light-gray);
    border-radius: var(--pu-radius-sm);
}

.crop-modal-footer {
    padding: var(--pu-spacing-md) var(--pu-spacing-lg);
    background: var(--pu-light-gray);
    border-top: 1px solid var(--pu-gray);
    display: flex;
    gap: var(--pu-spacing-sm);
    justify-content: flex-end;
    flex-wrap: wrap;
}

.crop-btn {
    padding: var(--pu-spacing-sm) var(--pu-spacing-md);
    border: none;
    border-radius: var(--pu-radius-sm);
    font-size: var(--pu-font-size-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--pu-transition-fast);
    min-width: 80px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.crop-btn-primary {
    background: linear-gradient(135deg, var(--pu-primary) 0%, var(--pu-accent) 100%);
    color: var(--pu-white);
    box-shadow: var(--pu-shadow-sm);
}

.crop-btn-primary:hover {
    background: linear-gradient(135deg, var(--pu-primary-dark) 0%, var(--pu-primary) 100%);
    transform: translateY(-1px);
    box-shadow: var(--pu-shadow-md);
}

.crop-btn-secondary {
    background: var(--pu-white);
    color: var(--pu-dark-gray);
    border: 1px solid var(--pu-gray);
}

.crop-btn-secondary:hover {
    background: var(--pu-light-gray);
    border-color: var(--pu-dark-gray);
}

.crop-btn:active {
    transform: translateY(0);
}

.crop-btn:focus {
    outline: 2px solid var(--pu-accent);
    outline-offset: 2px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .crop-modal-content {
        max-width: 98vw;
        max-height: 98vh;
        margin: 1vh;
    }

    .crop-modal-header {
        padding: var(--pu-spacing-sm) var(--pu-spacing-md);
    }

    .crop-modal-header h3 {
        font-size: var(--pu-font-size-base);
    }

    .crop-modal-body {
        padding: var(--pu-spacing-md);
    }

    .crop-canvas-container {
        max-width: 100%;
        max-height: 60vh;
    }

    .crop-handle {
        width: 16px;
        height: 16px;
        border-width: 3px;
    }

    .crop-modal-footer {
        padding: var(--pu-spacing-sm) var(--pu-spacing-md);
        flex-direction: column;
    }

    .crop-btn {
        width: 100%;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .crop-instructions {
        font-size: 12px;
        padding: var(--pu-spacing-xs);
    }

    .crop-handle {
        width: 20px;
        height: 20px;
    }

    .crop-modal-footer {
        gap: var(--pu-spacing-xs);
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
    .crop-handle {
        border-width: 1px;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .crop-handle {
        width: 20px;
        height: 20px;
        border-width: 3px;
    }

    .crop-selection {
        border-width: 3px;
    }

    .crop-bleeding-area {
        border-width: 3px;
    }
}

/* ==========================================================================
   MODAL SYSTEM - CENTERED POSITIONING
   ========================================================================== */

.photo-uploader-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--pu-transition-base);
    backdrop-filter: blur(4px);
}

.photo-uploader-modal.active {
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   CROP MODAL - ACCURATE POSITIONING & MOBILE SUPPORT
   ========================================================================== */

.photo-uploader-crop-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--pu-transition-base);
    backdrop-filter: blur(4px);
}

.photo-uploader-crop-modal.active {
    opacity: 1;
    visibility: visible;
}

.crop-modal-content {
    background: var(--pu-white);
    border-radius: var(--pu-radius-lg);
    box-shadow: var(--pu-shadow-xl);
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: initial;
    transform: scale(0.9);
    transition: transform var(--pu-transition-base);
    margin: auto;
}

.photo-uploader-crop-modal.active .crop-modal-content {
    transform: scale(1);
}

.crop-modal-header {
    background: linear-gradient(135deg, var(--pu-primary) 0%, var(--pu-accent) 100%);
    color: var(--pu-white);
    padding: var(--pu-spacing-md) var(--pu-spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: grab;
    user-select: none;
}

.crop-modal-header:active {
    cursor: grabbing;
}

.crop-modal-header h3 {
    margin: 0;
    font-size: var(--pu-font-size-lg);
    font-weight: 600;
}

.crop-modal-header .modal-close {
    background: none;
    border: none;
    color: var(--pu-white);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--pu-radius-sm);
    transition: background-color var(--pu-transition-fast);
}

.crop-modal-header .modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.crop-modal-body {
    padding: var(--pu-spacing-lg);
    display: flex;
    flex-direction: column;
    gap: var(--pu-spacing-md);
    flex: 1;
    overflow: hidden;
}

.crop-instructions {
    text-align: center;
    color: var(--pu-dark-gray);
    font-size: var(--pu-font-size-sm);
    padding: var(--pu-spacing-sm);
    background: var(--pu-light-gray);
    border-radius: var(--pu-radius-sm);
    border-left: 3px solid var(--pu-primary);
}

.crop-canvas-container {
    position: relative;
    margin: 0 auto;
    border: 2px solid var(--pu-gray);
    border-radius: var(--pu-radius-md);
    overflow: hidden;
    background: var(--pu-light-gray);
    box-shadow: var(--pu-shadow-md);
}

.crop-canvas {
    display: block;
    max-width: 100%;
    max-height: 100%;
    touch-action: none;
    user-select: none;
}

.crop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.crop-selection {
    position: absolute;
    border: 2px solid var(--pu-white);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    pointer-events: all;
    cursor: move;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(1px);
}

.crop-bleeding-area {
    position: absolute;
    border: 2px dashed #ff4444;
    pointer-events: none;
    background: rgba(255, 68, 68, 0.1);
    z-index: 5;
}

.crop-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--pu-white);
    border: 2px solid var(--pu-primary);
    border-radius: 2px;
    pointer-events: all;
    z-index: 15;
    box-shadow: var(--pu-shadow-sm);
    transition: all var(--pu-transition-fast);
}

.crop-handle:hover {
    background: var(--pu-primary);
    transform: scale(1.2);
    box-shadow: var(--pu-shadow-md);
}

/* Handle cursors */
.crop-handle-nw {
    cursor: nw-resize;
}

.crop-handle-n {
    cursor: n-resize;
}

.crop-handle-ne {
    cursor: ne-resize;
}

.crop-handle-w {
    cursor: w-resize;
}

.crop-handle-e {
    cursor: e-resize;
}

.crop-handle-sw {
    cursor: sw-resize;
}

.crop-handle-s {
    cursor: s-resize;
}

.crop-handle-se {
    cursor: se-resize;
}

.crop-info {
    text-align: center;
    color: var(--pu-dark-gray);
    font-size: var(--pu-font-size-sm);
    padding: var(--pu-spacing-sm);
    background: var(--pu-light-gray);
    border-radius: var(--pu-radius-sm);
}

.crop-modal-footer {
    padding: var(--pu-spacing-md) var(--pu-spacing-lg);
    background: var(--pu-light-gray);
    border-top: 1px solid var(--pu-gray);
    display: flex;
    gap: var(--pu-spacing-sm);
    justify-content: flex-end;
    flex-wrap: wrap;
}

.crop-btn {
    padding: var(--pu-spacing-sm) var(--pu-spacing-md);
    border: none;
    border-radius: var(--pu-radius-sm);
    font-size: var(--pu-font-size-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--pu-transition-fast);
    min-width: 80px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.crop-btn-primary {
    background: linear-gradient(135deg, var(--pu-primary) 0%, var(--pu-accent) 100%);
    color: var(--pu-white);
    box-shadow: var(--pu-shadow-sm);
}

.crop-btn-primary:hover {
    background: linear-gradient(135deg, var(--pu-primary-dark) 0%, var(--pu-primary) 100%);
    transform: translateY(-1px);
    box-shadow: var(--pu-shadow-md);
}

.crop-btn-secondary {
    background: var(--pu-white);
    color: var(--pu-dark-gray);
    border: 1px solid var(--pu-gray);
}

.crop-btn-secondary:hover {
    background: var(--pu-light-gray);
    border-color: var(--pu-dark-gray);
}

.crop-btn:active {
    transform: translateY(0);
}

.crop-btn:focus {
    outline: 2px solid var(--pu-accent);
    outline-offset: 2px;
}

/* ==========================================================================
   IMAGE VIEWER MODAL - CENTERED POSITIONING
   ========================================================================== */

.image-viewer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--pu-transition-base);
}

.image-viewer-modal.active {
    opacity: 1;
    visibility: visible;
}

.image-viewer-content {
    background: var(--pu-white);
    border-radius: var(--pu-radius-lg);
    box-shadow: var(--pu-shadow-xl);
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform var(--pu-transition-base);
}

.image-viewer-modal.active .image-viewer-content {
    transform: scale(1);
}

.image-viewer-header {
    background: linear-gradient(135deg, var(--pu-primary) 0%, var(--pu-accent) 100%);
    color: var(--pu-white);
    padding: var(--pu-spacing-md) var(--pu-spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.image-viewer-header h3 {
    margin: 0;
    font-size: var(--pu-font-size-lg);
    font-weight: 600;
}

.image-viewer-body {
    padding: var(--pu-spacing-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 70vh;
    overflow: hidden;
}

.image-viewer-body img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--pu-radius-sm);
}

.image-viewer-footer {
    padding: var(--pu-spacing-md) var(--pu-spacing-lg);
    background: var(--pu-light-gray);
    border-top: 1px solid var(--pu-gray);
    text-align: center;
    color: var(--pu-dark-gray);
    font-size: var(--pu-font-size-sm);
}

/* ==========================================================================
   CONFIRMATION DIALOG - CENTERED POSITIONING
   ========================================================================== */

.photo-uploader-confirmation-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--pu-transition-base);
}

.photo-uploader-confirmation-dialog.active {
    opacity: 1;
    visibility: visible;
}

.confirmation-dialog-content {
    background: var(--pu-white);
    border-radius: var(--pu-radius-lg);
    box-shadow: var(--pu-shadow-xl);
    max-width: 400px;
    width: 90vw;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform var(--pu-transition-base);
}

.photo-uploader-confirmation-dialog.active .confirmation-dialog-content {
    transform: scale(1);
}

.confirmation-dialog-header {
    padding: var(--pu-spacing-lg);
    text-align: center;
    background: var(--pu-light-gray);
}

.confirmation-dialog-icon {
    font-size: 48px;
    margin-bottom: var(--pu-spacing-sm);
}

.confirmation-dialog-body {
    padding: var(--pu-spacing-lg);
    text-align: center;
}

.confirmation-dialog-title {
    margin: 0 0 var(--pu-spacing-sm) 0;
    font-size: var(--pu-font-size-lg);
    font-weight: 600;
    color: var(--pu-black);
}

.confirmation-dialog-question {
    margin: 0;
    color: var(--pu-dark-gray);
    line-height: 1.5;
}

.confirmation-dialog-footer {
    padding: var(--pu-spacing-md) var(--pu-spacing-lg);
    background: var(--pu-light-gray);
    border-top: 1px solid var(--pu-gray);
    display: flex;
    gap: var(--pu-spacing-sm);
    justify-content: center;
}

.confirmation-btn {
    flex: 1;
    padding: var(--pu-spacing-sm) var(--pu-spacing-md);
    border: none;
    border-radius: var(--pu-radius-sm);
    font-size: var(--pu-font-size-base);
    font-weight: 500;
    cursor: pointer;
    transition: var(--pu-transition-fast);
}

.confirmation-btn-cancel {
    background: var(--pu-gray);
    color: var(--pu-dark-gray);
}

.confirmation-btn-cancel:hover {
    background: var(--pu-dark-gray);
    color: var(--pu-white);
}

.confirmation-btn-confirm {
    background: var(--pu-error);
    color: var(--pu-white);
}

.confirmation-btn-confirm:hover {
    background: #c23232;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .crop-modal-content {
        max-width: 98vw;
        max-height: 98vh;
        margin: 1vh;
    }

    .crop-modal-header {
        padding: var(--pu-spacing-sm) var(--pu-spacing-md);
    }

    .crop-modal-header h3 {
        font-size: var(--pu-font-size-base);
    }

    .crop-modal-body {
        padding: var(--pu-spacing-md);
    }

    .crop-canvas-container {
        max-width: 100%;
        max-height: 60vh;
    }

    .crop-handle {
        width: 16px;
        height: 16px;
        border-width: 3px;
    }

    .crop-modal-footer {
        padding: var(--pu-spacing-sm) var(--pu-spacing-md);
        flex-direction: column;
    }

    .crop-btn {
        width: 100%;
        min-width: auto;
    }

    .image-viewer-content {
        max-width: 95vw;
        max-height: 95vh;
    }

    .confirmation-dialog-content {
        max-width: 95vw;
    }
}

@media (max-width: 480px) {
    .crop-instructions {
        font-size: 12px;
        padding: var(--pu-spacing-xs);
    }

    .crop-handle {
        width: 20px;
        height: 20px;
    }

    .crop-modal-footer {
        gap: var(--pu-spacing-xs);
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
    .crop-handle {
        border-width: 1px;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .crop-handle {
        width: 20px;
        height: 20px;
        border-width: 3px;
    }

    .crop-selection {
        border-width: 3px;
    }

    .crop-bleeding-area {
        border-width: 3px;
    }
}

/* 
==========================================================================
   END OF PHOTO UPLOADER CORE CSS
   ========================================================================== */
/* ==========================================================================
   MODAL SYSTEM STYLES
   ========================================================================== */

/* Modal Overlay - Full Screen Backdrop */
.photo-uploader-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--pu-transition-base);
    padding: var(--pu-spacing-md);
    box-sizing: border-box;
}

.photo-uploader-modal.active {
    opacity: 1;
    visibility: visible;
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
}

/* ==========================================================================
   CROP MODAL STYLES
   ========================================================================== */

.photo-uploader-crop-modal .crop-modal-content {
    background: var(--pu-white);
    border-radius: var(--pu-radius-xl);
    box-shadow: var(--pu-shadow-float);
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: all var(--pu-transition-base);
}

.photo-uploader-crop-modal.active .crop-modal-content {
    transform: scale(1) translateY(0);
}

/* Crop Modal Header */
.crop-modal-header {
    background: linear-gradient(135deg, var(--pu-primary) 0%, var(--pu-accent) 100%);
    color: var(--pu-white);
    padding: var(--pu-spacing-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.crop-modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    50% {
        left: 100%;
    }

    100% {
        left: 100%;
    }
}

.crop-modal-header h3 {
    margin: 0;
    font-size: var(--pu-font-size-xl);
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.crop-modal-header .modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: var(--pu-white);
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--pu-transition-fast);
    backdrop-filter: blur(10px);
}

.crop-modal-header .modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg) scale(1.1);
}

/* Crop Modal Body */
.crop-modal-body {
    padding: var(--pu-spacing-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--pu-spacing-md);
    flex: 1;
    min-height: 0;
}

.crop-instructions {
    background: linear-gradient(135deg, var(--pu-light-gray) 0%, var(--pu-white) 100%);
    border: 1px solid var(--pu-gray);
    border-radius: var(--pu-radius-md);
    padding: var(--pu-spacing-sm) var(--pu-spacing-md);
    text-align: center;
    font-size: var(--pu-font-size-sm);
    color: var(--pu-dark-gray);
    box-shadow: var(--pu-shadow-sm);
    animation: fadeInUp 0.5s ease 0.2s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Crop Canvas Container */
.crop-canvas-container {
    position: relative;
    border: 2px solid var(--pu-gray);
    border-radius: var(--pu-radius-lg);
    overflow: hidden;
    box-shadow: var(--pu-shadow-lg);
    background: var(--pu-white);
    animation: scaleIn 0.6s ease 0.3s both;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.crop-canvas {
    display: block;
    max-width: 100%;
    max-height: 100%;
    cursor: crosshair;
    transition: filter var(--pu-transition-fast);
}

.crop-canvas:hover {
    filter: brightness(1.05);
}

/* Crop Overlay and Selection */
.crop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.crop-selection {
    position: absolute;
    border: 2px solid var(--pu-primary);
    background: rgba(0, 124, 186, 0.1);
    cursor: move;
    pointer-events: all;
    transition: all var(--pu-transition-fast);
    animation: pulseSelection 2s ease-in-out infinite;
}

@keyframes pulseSelection {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(0, 124, 186, 0.4);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(0, 124, 186, 0.1);
    }
}

.crop-selection:hover {
    background: rgba(0, 124, 186, 0.15);
    border-color: var(--pu-accent);
}

/* Crop Handles */
.crop-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--pu-white);
    border: 2px solid var(--pu-primary);
    border-radius: 50%;
    cursor: pointer;
    transform: translate(-50%, -50%);
    transition: all var(--pu-transition-fast);
    box-shadow: var(--pu-shadow-md);
}

.crop-handle:hover {
    background: var(--pu-primary);
    transform: translate(-50%, -50%) scale(1.3);
    box-shadow: var(--pu-shadow-lg);
}

/* Handle Positions */
.crop-handle-nw {
    top: 0;
    left: 0;
    cursor: nw-resize;
}

.crop-handle-n {
    top: 0;
    left: 50%;
    cursor: n-resize;
}

.crop-handle-ne {
    top: 0;
    right: 0;
    cursor: ne-resize;
}

.crop-handle-w {
    top: 50%;
    left: 0;
    cursor: w-resize;
}

.crop-handle-e {
    top: 50%;
    right: 0;
    cursor: e-resize;
}

.crop-handle-sw {
    bottom: 0;
    left: 0;
    cursor: sw-resize;
}

.crop-handle-s {
    bottom: 0;
    left: 50%;
    cursor: s-resize;
}

.crop-handle-se {
    bottom: 0;
    right: 0;
    cursor: se-resize;
}

/* Bleeding Area Indicator */
.crop-bleeding-area {
    position: absolute;
    border: 2px dashed var(--pu-error);
    background: rgba(220, 50, 50, 0.05);
    pointer-events: none;
    animation: dashMove 2s linear infinite;
}

@keyframes dashMove {
    0% {
        stroke-dashoffset: 0;
    }

    100% {
        stroke-dashoffset: 20px;
    }
}

/* Crop Info */
.crop-info {
    background: var(--pu-light-gray);
    border: 1px solid var(--pu-gray);
    border-radius: var(--pu-radius-md);
    padding: var(--pu-spacing-sm) var(--pu-spacing-md);
    font-size: var(--pu-font-size-sm);
    color: var(--pu-dark-gray);
    font-family: 'Courier New', monospace;
    animation: fadeInUp 0.5s ease 0.4s both;
}

/* Crop Modal Footer */
.crop-modal-footer {
    background: var(--pu-light-gray);
    border-top: 1px solid var(--pu-gray);
    padding: var(--pu-spacing-lg);
    display: flex;
    gap: var(--pu-spacing-md);
    justify-content: flex-end;
    animation: slideInUp 0.5s ease 0.5s both;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Crop Buttons */
.crop-btn {
    padding: var(--pu-spacing-sm) var(--pu-spacing-lg);
    border: none;
    border-radius: var(--pu-radius-md);
    font-size: var(--pu-font-size-base);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--pu-transition-fast);
    position: relative;
    overflow: hidden;
    min-width: 100px;
}

.crop-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left var(--pu-transition-base);
}

.crop-btn:hover::before {
    left: 100%;
}

.crop-btn-primary {
    background: linear-gradient(135deg, var(--pu-primary) 0%, var(--pu-accent) 100%);
    color: var(--pu-white);
    box-shadow: var(--pu-shadow-md);
}

.crop-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--pu-shadow-lg);
}

.crop-btn-secondary {
    background: var(--pu-white);
    color: var(--pu-dark-gray);
    border: 1px solid var(--pu-gray);
    box-shadow: var(--pu-shadow-sm);
}

.crop-btn-secondary:hover {
    background: var(--pu-light-gray);
    border-color: var(--pu-primary);
    color: var(--pu-primary);
    transform: translateY(-1px);
}

/* ==========================================================================
   IMAGE VIEWER MODAL STYLES
   ========================================================================== */

.image-viewer-modal .image-viewer-content {
    background: var(--pu-white);
    border-radius: var(--pu-radius-xl);
    box-shadow: var(--pu-shadow-float);
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: all var(--pu-transition-base);
}

.image-viewer-modal.active .image-viewer-content {
    transform: scale(1) translateY(0);
}

.image-viewer-header {
    background: linear-gradient(135deg, var(--pu-secondary) 0%, var(--pu-primary) 100%);
    color: var(--pu-white);
    padding: var(--pu-spacing-md) var(--pu-spacing-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.image-viewer-header h3 {
    margin: 0;
    font-size: var(--pu-font-size-lg);
    font-weight: 500;
}

.image-viewer-body {
    padding: var(--pu-spacing-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 70vh;
    overflow: hidden;
}

.image-viewer-body img {
    max-width: 100%;
    max-height: 100%;
    border-radius: var(--pu-radius-md);
    box-shadow: var(--pu-shadow-lg);
}

.image-viewer-footer {
    background: var(--pu-light-gray);
    border-top: 1px solid var(--pu-gray);
    padding: var(--pu-spacing-md) var(--pu-spacing-lg);
    display: flex;
    gap: var(--pu-spacing-lg);
    font-size: var(--pu-font-size-sm);
    color: var(--pu-dark-gray);
}

.processed-indicator {
    color: var(--pu-success);
    font-weight: 500;
}

/* ==========================================================================
   CONFIRMATION DIALOG STYLES
   ========================================================================== */

.photo-uploader-confirmation-dialog .confirmation-dialog-content {
    background: var(--pu-white);
    border-radius: var(--pu-radius-xl);
    box-shadow: var(--pu-shadow-float);
    width: 400px;
    max-width: 90vw;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.8) translateY(30px);
    transition: all var(--pu-transition-base);
}

.photo-uploader-confirmation-dialog.active .confirmation-dialog-content {
    transform: scale(1) translateY(0);
}

.confirmation-dialog-header {
    background: linear-gradient(135deg, var(--pu-warning) 0%, #ff8c00 100%);
    padding: var(--pu-spacing-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.confirmation-dialog-icon {
    font-size: 48px;
    animation: bounce 1s ease infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

.confirmation-dialog-body {
    padding: var(--pu-spacing-xl);
    text-align: center;
}

.confirmation-dialog-title {
    margin: 0 0 var(--pu-spacing-md) 0;
    font-size: var(--pu-font-size-xl);
    font-weight: 600;
    color: var(--pu-black);
}

.confirmation-dialog-question {
    margin: 0;
    font-size: var(--pu-font-size-base);
    color: var(--pu-dark-gray);
    line-height: 1.5;
}

.confirmation-dialog-footer {
    background: var(--pu-light-gray);
    border-top: 1px solid var(--pu-gray);
    padding: var(--pu-spacing-lg);
    display: flex;
    gap: var(--pu-spacing-md);
    justify-content: center;
}

.confirmation-btn {
    padding: var(--pu-spacing-sm) var(--pu-spacing-xl);
    border: none;
    border-radius: var(--pu-radius-md);
    font-size: var(--pu-font-size-base);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--pu-transition-fast);
    min-width: 100px;
}

.confirmation-btn-cancel {
    background: var(--pu-white);
    color: var(--pu-dark-gray);
    border: 1px solid var(--pu-gray);
}

.confirmation-btn-cancel:hover {
    background: var(--pu-light-gray);
    border-color: var(--pu-dark-gray);
}

.confirmation-btn-confirm {
    background: linear-gradient(135deg, var(--pu-error) 0%, #dc143c 100%);
    color: var(--pu-white);
    box-shadow: var(--pu-shadow-md);
}

.confirmation-btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: var(--pu-shadow-lg);
}

/* ==========================================================================
   UPLOAD PROGRESS MODAL STYLES
   ========================================================================== */

.upload-confirmation-modal .modal-content,
.upload-progress-modal .modal-content {
    background: var(--pu-white);
    border-radius: var(--pu-radius-xl);
    box-shadow: var(--pu-shadow-float);
    width: 500px;
    max-width: 90vw;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: all var(--pu-transition-base);
}

.upload-confirmation-modal.active .modal-content,
.upload-progress-modal.active .modal-content {
    transform: scale(1) translateY(0);
}

.upload-confirmation-modal .modal-header,
.upload-progress-modal .modal-header {
    background: linear-gradient(135deg, var(--pu-success) 0%, #32cd32 100%);
    color: var(--pu-white);
    padding: var(--pu-spacing-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.upload-confirmation-modal .modal-header h3,
.upload-progress-modal .modal-header h3 {
    margin: 0;
    font-size: var(--pu-font-size-xl);
    font-weight: 600;
}

/* Progress Bar Styles */
.progress-container {
    margin: var(--pu-spacing-lg) 0;
}

.progress-bar {
    background: var(--pu-gray);
    border-radius: var(--pu-radius-md);
    height: 8px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    background: linear-gradient(90deg, var(--pu-primary) 0%, var(--pu-accent) 100%);
    height: 100%;
    border-radius: var(--pu-radius-md);
    transition: width var(--pu-transition-base);
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progressShimmer 2s infinite;
}

@keyframes progressShimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.progress-text {
    text-align: center;
    margin-top: var(--pu-spacing-sm);
    font-size: var(--pu-font-size-sm);
    color: var(--pu-dark-gray);
    font-weight: 500;
}

/* Task List Styles */
.task-list {
    display: flex;
    flex-direction: column;
    gap: var(--pu-spacing-sm);
}

.task-item {
    display: flex;
    align-items: center;
    gap: var(--pu-spacing-sm);
    padding: var(--pu-spacing-sm);
    border-radius: var(--pu-radius-md);
    background: var(--pu-light-gray);
    transition: all var(--pu-transition-fast);
}

.task-item.completed {
    background: rgba(70, 180, 80, 0.1);
    border-left: 4px solid var(--pu-success);
}

.task-icon {
    font-size: var(--pu-font-size-lg);
    width: 24px;
    text-align: center;
}

.task-text {
    font-size: var(--pu-font-size-sm);
    color: var(--pu-dark-gray);
}

/* ==========================================================================
   MOBILE RESPONSIVE MODAL STYLES
   ========================================================================== */

@media (max-width: 768px) {
    .photo-uploader-modal {
        padding: var(--pu-spacing-sm);
    }

    .photo-uploader-crop-modal .crop-modal-content {
        max-width: 95vw;
        max-height: 95vh;
    }

    .crop-modal-header {
        padding: var(--pu-spacing-md);
    }

    .crop-modal-header h3 {
        font-size: var(--pu-font-size-lg);
    }

    .crop-modal-body {
        padding: var(--pu-spacing-md);
    }

    .crop-modal-footer {
        padding: var(--pu-spacing-md);
        flex-direction: column;
    }

    .crop-btn {
        width: 100%;
    }

    .crop-canvas-container {
        max-width: 100%;
        max-height: 50vh;
    }

    .crop-handle {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 480px) {
    .crop-modal-footer {
        gap: var(--pu-spacing-sm);
    }

    .confirmation-dialog-content {
        width: 95vw;
    }

    .confirmation-dialog-footer {
        flex-direction: column;
    }

    .confirmation-btn {
        width: 100%;
    }
}