/**
 * VertualHands - Passport Photo Styles
 *
 * @package VertualHands_Pro
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --success: #10b981;
    --danger: #ef4444;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-700: #374151;
    --gray-900: #111827;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

.passport-photo-page {
    width: 100%;
    background-color: #000000;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.app-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 24px;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.passport-photo-page::before,
.passport-photo-page::after,
.app-container::before,
.app-container::after {
    display: none !important;
    content: none !important;
}


/* Desktop-specific enhancements */
@media (min-width: 1024px) {
    .app-container {
        padding: 20px 24px;
        /* Reduced padding for wider work area */
    }

    .action-bar {
        justify-content: center;
        gap: 12px;
    }

    .action-bar .btn {
        min-width: auto;
    }

    .preview-grid {
        /* Robust 1 or 2 column layout: 
           - If 1 card: Stretches full width (1fr)
           - If 2+ cards: Side-by-side (45% min width keeps 2 max) */
        grid-template-columns: repeat(auto-fit, minmax(45%, 1fr));
        gap: 20px;
        justify-content: center;
    }

    /* Larger image previews on desktop */
    .preview-image-container {
        min-height: 600px;
    }

    .preview-image-container img {
        max-height: 600px;
    }
}

@media (min-width: 1400px) {
    .app-container {
        padding: 32px 40px;
        max-width: 98vw;
        /* Utilize almost full screen width */
    }

    .header h1,
    .header h2 {
        font-size: 3rem;
    }

    .header p {
        font-size: 1.25rem;
    }

    .upload-zone {
        padding: 64px;
    }

    .upload-zone h3 {
        font-size: 1.75rem;
    }

    .preview-grid {
        grid-template-columns: 1fr 1fr;
        gap: 48px;
    }

    /* Even larger previews on wide desktop */
    .preview-image-container {
        min-height: 650px;
    }

    .preview-image-container img {
        max-height: 650px;
    }
}

/* Header - Pure Black SaaS Theme with Gradient Border (Title in White) */
.passport-photo-page > .entry-header,
.passport-photo-page .entry-header,
article:has(.app-container) .entry-header,
article:has(.app-container) > .entry-header,
.page-template-page-passport-photo .entry-header {
    display: none !important;
}

.header {
    text-align: center;
    margin-bottom: 32px;
    padding: 32px 24px;
    background: #000000;
    position: relative;
    border: double 1px transparent;
    border-radius: 16px;
    background-image: linear-gradient(#000, #000),
        linear-gradient(135deg, #3b82f6, #8b5cf6, #ec4899);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.header h1,
.header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: 'Alice', serif;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background: none !important;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.header p,
.header .header-subtitle {
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.15rem;
    line-height: 1.6;
    max-width: 760px;
    margin: 0 auto;
    font-family: 'Alice', serif;
    font-weight: 500;
}

@media (min-width: 1024px) {
    .header p,
    .header .header-subtitle {
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    .header h1,
    .header h2 {
        font-size: 1.85rem !important;
        line-height: 1.25 !important;
    }

    .header p,
    .header .header-subtitle {
        font-size: 0.95rem !important;
        line-height: 1.5 !important;
    }
}

/* Upload Zone - Transparent with White Dotted Border */
.upload-zone {
    background: transparent !important;
    position: relative;
    border: 2px dotted #ffffff !important;
    border-radius: 20px;
    padding: 64px 48px;
    text-align: center;
    margin-bottom: 32px;
    transition: all 0.4s ease;
    cursor: pointer;
    box-shadow: none;
    overflow: hidden;
}

.upload-zone::before {
    display: none;
}

.upload-zone:hover,
.upload-zone.dragover {
    transform: translateY(-2px);
    box-shadow: none;
    border-color: rgba(255, 255, 255, 0.9) !important;
    background: rgba(255, 255, 255, 0.02) !important;
}

.upload-zone-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
}

.upload-zone-icon svg {
    width: 40px;
    height: 40px;
    fill: white;
}

.upload-zone h3 {
    font-size: 1.5rem;
    color: #ffffff;
    margin-bottom: 8px;
    font-weight: 700;
}

.upload-zone p {
    color: rgba(255, 255, 255, 0.7);
}

#fileInput {
    display: none;
}

/* Action Buttons */
.action-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 32px;
}

.btn {
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Alice', serif;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 140px;
    justify-content: center;
    box-shadow: none;
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #1d4ed8);
    color: white;
    box-shadow: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: none;
}

.btn-success,
.passport-photo-page .btn-success,
.app-container .btn-success {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

.btn-success:hover,
.passport-photo-page .btn-success:hover,
.app-container .btn-success:hover {
    transform: translateY(-2px) !important;
    box-shadow: none !important;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: white;
    box-shadow: none;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: none;
}

.btn-info,
#btnAdvancedEdit {
    background: #ffffff !important;
    color: #111827 !important;
    box-shadow: none !important;
}

.btn-info:hover:not(:disabled),
#btnAdvancedEdit:hover:not(:disabled) {
    background: #f3f4f6 !important;
    color: #000000 !important;
    transform: translateY(-2px) !important;
}

/* PRO Badge styling - Vibrant Purple/Indigo Gradient with Crisp White Text */
.ppp-pro-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 7px;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.2;
    border-radius: 5px;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #8b5cf6, #6366f1) !important;
    color: #ffffff !important;
    margin-left: 6px;
    box-shadow: 0 2px 6px rgba(139, 92, 246, 0.4);
    vertical-align: middle;
    text-transform: uppercase;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Preview Grid */
.preview-grid {
    display: grid;
    grid-template-columns: 1fr;
    /* Single column for mobile */
    gap: 28px;
    margin-bottom: 32px;
    width: 100%;
    /* Ensure full width used */
}

.preview-card {
    background: transparent;
    border-radius: 16px;
    box-shadow: none;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px dotted #ffffff !important;
}

.preview-card:hover {
    box-shadow: none;
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.9) !important;
}

.preview-card-header {
    padding: 16px;
    background: transparent;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-card-title {
    font-weight: 600;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #ffffff;
    font-size: 1rem;
    /* Removed max-width to allow full expansion on desktop */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.btn-remove {
    background: var(--danger);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-remove:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.btn-remove svg {
    width: 16px;
    height: 16px;
    fill: white;
}

.preview-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 20px;
    background: transparent;
}

.preview-section {
    text-align: center;
}

.preview-section-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ffffff;
    margin-bottom: 10px;
    font-weight: 600;
    font-family: 'Alice', serif;
    -webkit-font-smoothing: antialiased;
    background: #2563eb;
    /* Solid Blue instead of Gradient */
    padding: 6px 16px;
    border-radius: 6px;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.preview-image-container {
    background: transparent !important;
    border-radius: 10px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 550px;
    width: 100%;
    /* Force full width within grid cell */
    border: 1px dashed rgba(255, 255, 255, 0.2);
    box-shadow: none;
}

/* Remove white background from original image section */
.preview-section:first-child .preview-image-container,
.preview-section .preview-image-container {
    background: transparent !important;
    background-color: transparent !important;
}

.preview-image-container img {
    max-width: 100%;
    max-height: 550px;
    /* Increased height */
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.preview-card-footer {
    padding: 16px;
    border-top: 1px dashed rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    overflow: visible;
    background: transparent;
}

/* Copies Control */
.copies-control-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: transparent !important;
    border: 2px dotted #ffffff !important;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.copies-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
    margin-right: 4px;
}

.copies-display {
    width: 50px;
    padding: 6px 4px;
    border: 2px dotted #ffffff;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    background: transparent;
    color: white;
    box-shadow: none;
}

.copies-display:focus {
    outline: none;
    border-color: #3b82f6;
}

.btn-copy-adjust {
    width: 28px;
    height: 28px;
    border: 2px dotted #ffffff;
    background: transparent;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    padding-bottom: 4px;
    /* Alignment tweak */
}

.btn-copy-adjust:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.btn-crop {
    padding: 8px 14px;
    font-size: 0.8rem;
    white-space: nowrap;
}

/* Adjustment Controls */
.adjustment-controls {
    background: transparent !important;
    border-top: 2px dotted #ffffff !important;
    padding: 12px 16px;
}

.adjustment-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
    margin-bottom: 12px;
    width: 100% !important;
}

.adjustment-row:last-child {
    margin-bottom: 0;
}

.adjustment-row label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #ffffff !important;
    white-space: nowrap;
    min-width: 0;
    background: #2563eb;
    /* Solid Blue instead of Gradient */
    padding: 6px 12px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.adjustment-input-wrapper {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
}



.photo-bg-select {
    color: #000000 !important;
    /* Ensure text is visible on white background */
    font-weight: 500;
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge.status-pending {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: none !important;
}

.status-badge.status-done {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: none !important;
}

.status-badge.status-error {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: none !important;
}

/* Usage Limit Badge */
.usage-limit-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px !important;
}

.usage-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 24px;
    font-size: 0.95rem;
    font-weight: 700;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: none;
}

.usage-badge.unlimited {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    box-shadow: none;
}

.usage-badge.exhausted {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: none;
}

/* Print Grid */
.print-section {
    background: #ffffff !important;
    border-radius: 16px;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 24px;
    margin-top: 32px;
}

.print-section h2,
body .print-section h2.no-print,
#printSection h2.no-print,
#printSection h2 {
    font-size: 1.5rem;
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    font-weight: 800 !important;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.print-section h2 svg,
body .print-section h2.no-print svg,
#printSection h2.no-print svg,
#printSection h2 svg {
    fill: #000000 !important;
}


.print-grid {
    display: grid;
    grid-template-columns: repeat(5, 35mm);
    grid-auto-rows: 45mm;
    gap: 1mm;
    padding: 8px;
    background: #ffffff !important;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    justify-content: center;
}

.print-photo {
    width: 35mm;
    height: 45mm;
    border: none !important;
    outline: 1px solid #000 !important;
    outline-offset: -1px !important;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: white;
}

.print-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #ffffff !important;
}

/* Print Layout Selector — force light theme regardless of dark-theme.css */
#pppLayoutSelector {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 10px !important;
    padding: 10px 14px !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 10px 0 14px !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07) !important;
}

#pppLayoutSelector span {
    color: #111827 !important;
    -webkit-text-fill-color: #111827 !important;
    font-weight: 700 !important;
    font-size: 0.82rem !important;
    white-space: nowrap !important;
}

#pppLayoutSelector label {
    color: #111827 !important;
    -webkit-text-fill-color: #111827 !important;
    font-size: 0.82rem !important;
    cursor: pointer !important;
    padding: 5px 10px !important;
    border-radius: 6px !important;
    border: 1.5px solid #d1d5db !important;
    background: #f9fafb !important;
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    white-space: nowrap !important;
    transition: all 0.15s !important;
}

#pppLayoutSelector label:hover {
    border-color: #6366f1 !important;
    background: #f5f3ff !important;
}

#pppLayoutSelector input[type="radio"] {
    accent-color: #6366f1;
    cursor: pointer;
}

/* Mobile: stack layout options */
@media (max-width: 600px) {
    #pppLayoutSelector {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    #pppLayoutSelector label {
        width: 100% !important;
        justify-content: flex-start !important;
    }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    background: white;
    padding: 32px 48px;
    border-radius: 16px;
    text-align: center;
    color: #000000 !important;
}

.loading-spinner p,
.loading-spinner #processStatusText,
.loading-spinner .queue-position-text,
.loading-spinner .queue-position-text span {
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
}

.loading-spinner #processStatusText {
    font-weight: 700 !important;
}

.loading-spinner .queue-position-icon svg {
    stroke: #000000 !important;
    color: #000000 !important;
}

.loading-spinner .queue-dot {
    background: #000000 !important;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Queue Position Info */
.queue-position-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 14px 24px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 12px;
    backdrop-filter: blur(8px);
    animation: queueFadeIn 0.4s ease-out;
}

@keyframes queueFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.queue-position-icon {
    font-size: 24px;
    line-height: 1;
}

.queue-position-text {
    color: #93c5fd;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
}

.queue-position-text span {
    color: #60a5fa;
    font-size: 1.4rem;
    font-weight: 800;

    animation: queueCountPulse 2s ease-in-out infinite;
}

@keyframes queueCountPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7;  }
}

.queue-position-dots {
    display: flex;
    gap: 6px;
    align-items: center;
}

.queue-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #60a5fa;
    animation: queueDotBounce 1.4s ease-in-out infinite;
}

.queue-dot:nth-child(2) { animation-delay: 0.2s; }
.queue-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes queueDotBounce {
    0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
    40% { opacity: 1; transform: scale(1.2); }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 48px;
    color: var(--gray-500);
}

.empty-state svg {
    width: 80px;
    height: 80px;
    fill: var(--gray-300);
    margin-bottom: 16px;
}

/* SEO Content Section - Pure Black Dark Theme */
.seo-content {
    background: #000000;
    border-radius: 24px;
    margin-top: 48px;
    padding: 48px 24px;
    font-family: 'Alice', serif;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.seo-container {
    max-width: 1100px;
    margin: 0 auto;
}

.seo-title {
    text-align: center;
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 40px;
    background: linear-gradient(135deg, #60a5fa, #a78bfa, #f472b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

/* Card Grid */
.seo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.seo-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
}

.seo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.seo-card.blue::before {
    background: linear-gradient(90deg, #3b82f6, #2563eb);
}

.seo-card.purple::before {
    background: linear-gradient(90deg, #8b5cf6, #7c3aed);
}

.seo-card.green::before {
    background: linear-gradient(90deg, #10b981, #059669);
}

.seo-card.pink::before {
    background: linear-gradient(90deg, #ec4899, #db2777);
}

.seo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.seo-card.blue:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.seo-card.purple:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.seo-card.green:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.seo-card.pink:hover {
    box-shadow: 0 8px 30px rgba(236, 72, 153, 0.3);
}

.card-emoji {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 12px;
}

.seo-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 14px;
}

.seo-card.blue h3 {
    color: #60a5fa;
}

.seo-card.purple h3 {
    color: #a78bfa;
}

.seo-card.green h3 {
    color: #34d399;
}

.seo-card.pink h3 {
    color: #f472b6;
}

.seo-card p {
    color: #ffffff !important;
    line-height: 1.8;
    margin: 0;
    font-size: 1rem;
    font-weight: 400;
}

/* Colorful Text - Vibrant Colors for Dark Background */
.text-blue {
    color: #60a5fa !important;
    font-weight: 700;
    font-size: 1.05rem;
}

.text-purple {
    color: #c084fc !important;
    font-weight: 700;
    font-size: 1.05rem;
}

.text-green {
    color: #34d399 !important;
    font-weight: 700;
    font-size: 1.05rem;
}

.text-pink {
    color: #f472b6 !important;
    font-weight: 700;
    font-size: 1.05rem;
}

/* Feature Tags Row - Dark Theme */
.seo-features-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 28px;
}

.feature-tag {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s;
}

.feature-tag:hover {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    transform: translateY(-2px);
    box-shadow: none;
    border-color: transparent;
}

/* CTA - Dark Theme */
.seo-cta {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    margin: 0 auto;
    padding: 18px 32px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 12px;
    box-shadow: none;
    display: block;
    max-width: 500px;
}

@media (max-width: 768px) {
    .seo-content {
        padding: 32px 16px;
        margin-top: 32px;
    }

    .seo-title {
        font-size: 1.5rem;
        margin-bottom: 24px;
    }

    .seo-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .seo-card {
        padding: 20px;
    }

    .seo-card h3 {
        font-size: 1.1rem;
    }

    .seo-card p {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .text-blue,
    .text-purple,
    .text-green,
    .text-pink {
        font-size: 0.95rem;
    }

    .feature-list {
        grid-template-columns: 1fr;
    }

    .seo-features-row {
        gap: 8px;
    }

    .feature-tag {
        font-size: 0.75rem;
        padding: 8px 12px;
    }

    .seo-cta {
        font-size: 0.95rem;
        padding: 14px 20px;
    }
}

@media (max-width: 480px) {
    .seo-content {
        padding: 24px 12px;
    }

    .seo-title {
        font-size: 1.25rem;
    }

    .seo-card {
        padding: 16px;
    }

    .seo-card h3 {
        font-size: 1rem;
    }

    .seo-card p {
        font-size: 0.85rem;
    }

    .feature-tag {
        font-size: 0.7rem;
        padding: 6px 10px;
    }
}


/* Responsive */
@media (max-width: 768px) {
    .app-container {
        padding: 12px;
    }

    .header {
        padding: 20px 16px;
    }

    .header h1,
    .header h2 {
        font-size: 1.5rem;
    }

    .header p {
        font-size: 0.9rem;
    }

    .upload-zone {
        padding: 24px 16px;
    }

    .upload-zone h3 {
        font-size: 1.25rem;
    }

    .preview-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .action-bar {
        flex-direction: column;
        gap: 12px;
    }

    .action-bar .btn {
        width: 100%;
        justify-content: center;
        padding: 12px 16px;
        font-size: 0.9rem;
    }

    /* Photo card footer - stack buttons */
    .preview-card-footer {
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px;
    }

    .copies-input {
        width: 100%;
        padding: 10px 14px;
        justify-content: space-between;
    }

    .copies-input label {
        font-size: 1rem;
    }

    .copies-input input {
        width: 90px;
        padding: 10px 14px;
        font-size: 1.1rem;
    }

    .status-badge {
        order: -1;
    }

    .btn-crop {
        flex: 1;
        min-width: calc(50% - 5px);
        padding: 10px 12px;
        font-size: 0.8rem;
        justify-content: center;
        text-align: center;
        white-space: nowrap;
    }

    /* Adjustment controls */
    .adjustment-controls {
        padding: 10px 12px;
    }

    .adjustment-row {
        align-items: center !important;
        text-align: center !important;
    }

    .adjustment-row label {
        font-size: 0.7rem;
        align-self: center !important;
        margin-bottom: 4px !important;
    }

    .adjustment-input-wrapper {
        width: 90% !important;
        margin: 0 auto !important;
        justify-content: center !important;
    }

    .print-section {
        overflow-x: hidden;
        padding: 8px;
    }

    .print-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr) !important;
        min-width: 0 !important;
        width: 100% !important;
        justify-content: center;
        gap: 6px;
    }

    .print-photo {
        width: 100%;
        height: auto;
        aspect-ratio: 35 / 45;
    }

    .print-photo img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Stack photo previews vertically for larger images on mobile */
    .preview-images {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 16px;
    }

    .preview-image-container {
        min-height: 340px;
    }

    .preview-image-container img {
        max-height: 320px;
    }

    .preview-section-label {
        font-size: 0.75rem;
        padding: 5px 12px;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .app-container {
        padding: 8px;
    }

    .header h1,
    .header h2 {
        font-size: 1.25rem;
    }

    .btn-crop {
        min-width: 100%;
        flex-basis: 100%;
    }

    .preview-images {
        gap: 12px;
        padding: 12px;
    }

    .preview-image-container {
        min-height: 280px;
        padding: 12px;
    }

    .preview-image-container img {
        max-height: 260px;
    }

    .preview-section-label {
        font-size: 0.7rem;
        padding: 4px 10px;
    }
}

/* Print Styles - Fixed for both desktop and mobile */


/* ============================================================
   CROP MODAL — PURE LIQUID GLASS THEME (MOBILE OPTIMIZED)
   ============================================================ */

.crop-modal,
#cropModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    z-index: 99999;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 16px;
    box-sizing: border-box;
}

.crop-modal.show,
.crop-modal.active,
.crop-modal[style*="display: flex"],
.crop-modal[style*="display: block"],
#cropModal.show,
#cropModal.active,
#cropModal[style*="display: flex"],
#cropModal[style*="display: block"] {
    display: flex !important;
}

.crop-modal-content {
    background: linear-gradient(135deg, rgba(20, 26, 40, 0.95) 0%, rgba(10, 15, 28, 0.98) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 24px !important;
    padding: 24px !important;
    max-width: 860px !important;
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.2), inset 0 -1px 1px 0 rgba(0, 0, 0, 0.6), 0 25px 60px rgba(0, 0, 0, 0.8) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    color: #ffffff !important;
}

/* Ensure all text inside the crop modal is clean white / light */
#cropModal .crop-modal-content,
#cropModal .crop-modal-content p,
#cropModal .crop-modal-content span,
#cropModal .crop-modal-content label,
#cropModal .crop-modal-content strong {
    color: #ffffff !important;
}

.crop-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.crop-modal-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(180deg, #ffffff 40%, rgba(255, 255, 255, 0.75) 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.crop-modal-close {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    width: 36px;
    height: 36px;
    border-radius: 50% !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s ease;
}

.crop-modal-close:hover {
    background: #ef4444 !important;
    border-color: #ef4444 !important;
    transform: rotate(90deg);
}

.crop-modal-close svg {
    width: 18px;
    height: 18px;
    fill: #ffffff !important;
}

/* Workspace */
.crop-workspace {
    display: flex;
    gap: 24px;
    align-items: stretch;
}

.crop-area {
    position: relative;
    width: 440px;
    height: 560px;
    background: #000000;
    border: 2px solid rgba(59, 130, 246, 0.5);
    border-radius: 16px;
    overflow: hidden;
    cursor: move;
    flex-shrink: 0;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

.crop-area img {
    position: absolute;
    user-select: none;
    -webkit-user-drag: none;
}

.crop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    border: 2px dashed rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.65);
}

.crop-guides {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.crop-guides::before,
.crop-guides::after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.3);
}

.crop-guides::before {
    top: 33.33%;
    left: 0;
    right: 0;
    height: 1px;
}

.crop-guides::after {
    top: 66.66%;
    left: 0;
    right: 0;
    height: 1px;
}

/* Sidebar Controls */
.crop-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
    min-width: 260px;
    justify-content: center;
}

.crop-control-group {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.015) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 16px !important;
    padding: 16px 18px !important;
    box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.08) !important;
}

.crop-control-group label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff !important;
    margin-bottom: 10px;
}

.crop-control-group label span {
    color: #60a5fa !important;
    font-weight: 700;
    font-size: 0.95rem;

}

.crop-control-group input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.12) !important;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    accent-color: #3b82f6;
    margin: 4px 0;
}

.crop-control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
    cursor: pointer;
    border: 2px solid #ffffff !important;
    box-shadow: none !important;
}

.crop-control-group input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
    cursor: pointer;
    border: 2px solid #ffffff !important;
    box-shadow: none !important;
}

.crop-hint {
    font-size: 0.88rem;
    color: #e2e8f0 !important;
    text-align: center;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 14px !important;
    line-height: 1.55;
    box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.08) !important;
}

.crop-hint strong {
    color: #60a5fa !important;
}

/* Reset Position Button */
#cropModal .btn-primary,
.crop-controls .btn-primary {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 12px !important;
    padding: 12px 20px !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    cursor: pointer;
    transition: all 0.25s ease !important;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.15) !important;
    width: 100%;
}

#cropModal .btn-primary:hover,
.crop-controls .btn-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: none !important;
}

/* Modal Action Buttons: Cancel (Red) & Apply Crop (Green) */
.crop-modal-actions {
    display: flex;
    gap: 14px;
    justify-content: flex-end;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Cancel Button — Red Glass */
.crop-modal-actions .btn-secondary,
#cropModal .btn-secondary {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 13px 28px !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    cursor: pointer;
    transition: all 0.25s ease !important;
    box-shadow: none !important;
}

.crop-modal-actions .btn-secondary:hover,
#cropModal .btn-secondary:hover {
    transform: translateY(-2px) !important;
    box-shadow: none !important;
}

/* Apply Button — Green Glass */
.crop-modal-actions .btn-success,
#cropModal .btn-success {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 13px 32px !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    cursor: pointer;
    transition: all 0.25s ease !important;
    box-shadow: none !important;
}

.crop-modal-actions .btn-success:hover,
#cropModal .btn-success:hover {
    transform: translateY(-2px) !important;
    box-shadow: none !important;
}

/* ============================================
   RESPONSIVE CROP MODAL — Tablet & Mobile
   ============================================ */
@media (max-width: 900px) {
    .crop-modal-content {
        max-width: 95vw !important;
        padding: 18px !important;
        gap: 16px;
    }

    .crop-workspace {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }

    .crop-area {
        width: 100% !important;
        max-width: 340px !important;
        height: 420px !important;
    }

    .crop-controls {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
    }

    .crop-modal-actions {
        justify-content: stretch;
        gap: 10px;
    }

    .crop-modal-actions .btn {
        flex: 1;
        justify-content: center;
        text-align: center;
        padding: 12px 16px !important;
    }
}

@media (max-width: 480px) {
    .crop-modal-content {
        padding: 14px !important;
        border-radius: 18px !important;
    }

    .crop-modal-header h3 {
        font-size: 1.15rem;
    }

    .crop-area {
        max-width: 280px !important;
        height: 350px !important;
    }

    .crop-control-group {
        padding: 12px 14px !important;
    }

    .crop-hint {
        padding: 10px 12px;
        font-size: 0.82rem;
    }
}

/* Background Color Selector Button Styles */
.bg-color-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    padding: 14px 24px;
    border-radius: 12px;
    box-shadow: none;
    color: white;
    transition: all 0.3s ease;
}

.bg-color-selector:hover {
    transform: translateY(-2px);
    box-shadow: none;
}

.bg-color-dropdown-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bg-dropdown-icon {
    font-size: 1.1rem;
}

.bg-color-wrapper {
    position: relative;
    display: inline-block;
}

#btnBgColorSelector {
    position: relative;
    overflow: visible;
}

.bg-dropdown-panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 260px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.bg-dropdown-panel::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white;
}

.bg-dropdown-panel label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}

.bg-color-dropdown {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.95rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    color: #374151;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23374151' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.bg-color-dropdown:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: none;
}

.color-preview-box {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    background: #FFFFFF;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.color-preview-box.transparent {
    background-image:
        linear-gradient(45deg, #ccc 25%, transparent 25%),
        linear-gradient(-45deg, #ccc 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #ccc 75%),
        linear-gradient(-45deg, transparent 75%, #ccc 75%);
    background-size: 6px 6px;
    background-position: 0 0, 0 3px, 3px -3px, -3px 0px;
}

.custom-color-input {
    width: 36px;
    height: 36px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
    overflow: hidden;
    transition: all 0.2s ease;
    display: none;
}

.custom-color-input.show {
    display: block;
}

.custom-color-input:hover {
    transform: scale(1.1);
    border-color: white;
}

.custom-color-input::-webkit-color-swatch-wrapper {
    padding: 2px;
}

.custom-color-input::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

.custom-color-input::-moz-color-swatch {
    border: none;
    border-radius: 4px;
}

/* ============================================================
   ADVANCED EDIT PANEL — PURE LIQUID GLASS THEME
   ============================================================ */
.advanced-edit-panel {
    background: linear-gradient(135deg, rgba(20, 26, 40, 0.95) 0%, rgba(10, 15, 28, 0.98) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 20px !important;
    padding: 24px !important;
    margin-bottom: 28px !important;
    box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.2), inset 0 -1px 1px 0 rgba(0, 0, 0, 0.6), 0 20px 50px rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
}

.advanced-edit-panel h3 {
    margin: 0 0 22px !important;
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    background: linear-gradient(180deg, #ffffff 40%, rgba(255, 255, 255, 0.75) 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.01em;
}

.advanced-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.advanced-edit-panel .control-group {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.015) 100%) !important;
    padding: 16px !important;
    border-radius: 14px !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.08) !important;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 12px;
    align-items: center;
    transition: all 0.25s ease;
}

.advanced-edit-panel .control-group:hover {
    border-color: rgba(255, 255, 255, 0.16) !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.025) 100%) !important;
}

.advanced-edit-panel .control-group label {
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    margin: 0;
    grid-column: 1 / 2;
    grid-row: 1 / 2;
}

.advanced-edit-panel .control-group input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.12) !important;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    accent-color: #3b82f6;
    grid-column: 1 / -1;
    grid-row: 2 / 3;
    margin-top: 4px;
}

.advanced-edit-panel .control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
    cursor: pointer;
    border: 2px solid #ffffff !important;
    box-shadow: none !important;
    margin-top: -6px;
}

.advanced-edit-panel .control-group input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
    cursor: pointer;
    border: 2px solid #ffffff !important;
    box-shadow: none !important;
}

.advanced-edit-panel .control-value {
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    padding: 3px 8px !important;
    border-radius: 8px !important;
    min-width: 42px;
    text-align: center;
    grid-column: 2 / 3;
    grid-row: 1 / 2;
}

.advanced-controls-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    align-items: center;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.advanced-edit-panel .btn-secondary {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border-radius: 12px !important;
    padding: 12px 22px !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    cursor: pointer;
    transition: all 0.25s ease !important;
    box-shadow: none !important;
}

.advanced-edit-panel .btn-secondary:hover {
    transform: translateY(-2px) !important;
    box-shadow: none !important;
}

.advanced-edit-panel .btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 12px 24px !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    cursor: pointer;
    transition: all 0.25s ease !important;
    box-shadow: none !important;
}

.advanced-edit-panel .btn-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: none !important;
}

.advanced-edit-panel .btn-success {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 12px 26px !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    cursor: pointer;
    transition: all 0.25s ease !important;
    box-shadow: none !important;
}

.advanced-edit-panel .btn-success:hover {
    transform: translateY(-2px) !important;
    box-shadow: none !important;
}

/* Mobile responsive for action bar and panels */
@media (max-width: 768px) {
    .bg-dropdown-panel {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        min-width: 280px;
        max-width: 90vw;
    }

    .bg-dropdown-panel::before {
        display: none;
    }

    .bg-color-wrapper {
        width: 100%;
    }

    .advanced-controls {
        grid-template-columns: 1fr;
    }

    .advanced-controls-actions {
        flex-direction: column;
    }

    .advanced-controls-actions .btn {
        width: 100%;
    }
}

/* Modern Toast Notification */
.ppp-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: white;
    padding: 2rem 3rem;
    border-radius: 20px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
    z-index: 10000;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ppp-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.ppp-toast-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ppp-toast-success .ppp-toast-icon {
    background: linear-gradient(135deg, #10b981, #059669);
}

.ppp-toast-error .ppp-toast-icon {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.ppp-toast-icon svg {
    width: 40px;
    height: 40px;
    stroke: white;
    stroke-width: 3;
    fill: none;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: drawCheck 0.5s ease forwards 0.2s;
}

@keyframes drawCheck {
    to {
        stroke-dashoffset: 0;
    }
}

.ppp-toast-message {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.ppp-toast-submessage {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Toast overlay backdrop */
.ppp-toast-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.ppp-toast-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Photo Card Footer - Ensure Copies label is highly visible */
.preview-card-footer .copies-label,
.app-container .preview-card-footer .copies-label {
    color: #ffffff !important;
    font-weight: 700 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

/* Print Media Query */
@media print {

    /* Force white background on all possible parent elements */
    html,
    body,
    #page,
    .site,
    .site-content,
    .content-wrapper,
    main,
    #primary,
    .passport-photo-page,
    .app-container {
        background: #ffffff !important;
        background-color: #ffffff !important;
        color: #000000 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
    }

    /* Remove any dark theme gradients or overlays */
    body::before,
    body::after,
    .app-container::before,
    .app-container::after,
    .site::before,
    .site::after {
        display: none !important;
        content: none !important;
    }

    /* Force white background on everything with high specificity */
    html,
    html body,
    html .app-container,
    html .site-content,
    html .print-section {
        background: #ffffff !important;
        background-color: #ffffff !important;
        color: #000000 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    html,
    body {
        height: 100% !important;
        width: 100% !important;
        overflow: visible !important;
    }

    /* Show only the print section */
    html body .print-section {
        display: block !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        visibility: visible !important;
        overflow: visible !important;
        z-index: 9999 !important;
        background: #ffffff !important;
    }

    html body .print-grid {
        display: grid !important;
        grid-template-columns: repeat(5, 35mm) !important;
        grid-auto-rows: 45mm !important;
        gap: 2mm !important;
        width: 100% !important;
        background: #ffffff !important;
        justify-content: center !important;
        margin: 0 auto !important;
        padding: 10mm 0 !important;
    }

    .print-photo {
        width: 35mm !important;
        height: 45mm !important;
        background: #ffffff !important;
        border: none !important;
        outline: 1px solid #000000 !important;
        /* Use outline for cut lines */
        margin: 0 !important;
        padding: 0 !important;
        display: block !important;
        break-inside: avoid !important;
        float: none !important;
        /* Disable float since we use grid */
    }

    .print-photo img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        display: block !important;
        border: none !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Hide non-printable elements */
    .app-container,
    .header,
    .upload-zone,
    .action-bar,
    .preview-grid,
    .footer,
    .site-footer,
    .site-header,
    header.header,
    .seo-content,
    .adjustment-controls,
    .admin-bar,
    #wpadminbar,
    .preview-card-footer,
    .btn,
    .crop-controls,
    .usage-limit-container,
    .no-print,
    .print-section h2,
    .loading-overlay,
    .bg-color-selector,
    .entry-title,
    .page-title,
    h1,
    #masthead,
    #colophon,
    nav,
    aside,
    .wp-block-post-title {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        width: 0 !important;
        overflow: hidden !important;
        opacity: 0 !important;
    }

    /* Page Setup */
    @page {
        size: A4;
        margin: 10mm;
        /* Ensure valid margins */
        background: #ffffff;
    }
}