/* Process Page Specific Styles - Dark Premium SaaS Theme */

:root {
    --bg-dark: var(--bg-main);
    --bg-gradient: radial-gradient(circle at 50% 0%, #0b1220 0%, #000000 100%);
    --card-glass: var(--card-bg);
    --border-glass: var(--border-glass);
    --glow-purple: var(--brand-green-glow);
    --text-muted: var(--text-secondary);
    --accent-purple: var(--brand-green);
}

body {
    background: var(--bg-gradient);
    min-height: 100vh;
}

.processing-container {
    padding-top: 8rem;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Hero Section */
.process-hero {
    text-align: center;
    margin-bottom: 4rem;
    animation: fadeIn 0.8s ease-out;
}

.process-hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: white;
}

.process-hero .subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Stepper Styles */
.stepper-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 4rem;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
}

.step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-weight: 600;
}

.step-item.completed .step-circle {
    background: #34d399;
    color: #020205;
    border-color: #34d399;
}

.step-item.active .step-circle {
    background: var(--accent-purple);
    color: white;
    border-color: var(--accent-purple);
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.4);
}

.step-item.active {
    color: white;
}

.step-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.4) 0%, transparent 70%);
    pointer-events: none;
    animation: pulseGlow 2s infinite;
}

.step-line-new {
    width: 40px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.step-line-new.active {
    background: var(--accent-purple);
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.3);
}

/* Upload Card */
.upload-card-modern {
    background: var(--card-glass);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 3rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 700px;
    margin: 0 auto 3rem;
}

.upload-card-modern:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(34, 197, 94, 0.3);
}

.upload-zone-modern {
    border: 2px dashed var(--border-glass);
    border-radius: 16px;
    padding: 3rem 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.2);
}

.upload-zone-modern:hover {
    border-color: var(--accent-purple);
    background: var(--brand-green-soft);
}

.upload-icon-large {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    display: block;
    filter: drop-shadow(0 0 15px rgba(34, 197, 94, 0.4));
}

/* Support Card */
.support-card {
    background: linear-gradient(145deg, rgba(20, 20, 35, 0.9), rgba(10, 10, 20, 0.95));
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 24px;
    padding: 2.5rem;
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.support-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(34, 197, 94, 0.5), transparent);
}

.star-badge {
    width: 50px;
    height: 50px;
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.2);
}

.support-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.btn-youtube {
    background: #ef4444;
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-youtube:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.5);
    background: #dc2626;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

.btn-secondary.small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.tool-card {
    background: var(--card-glass);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 2rem;
    text-align: left;
    transition: all 0.3s ease;
    cursor: default;
}

.tool-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(34, 197, 94, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.tool-icon {
    width: 40px;
    height: 40px;
    background: var(--brand-green-soft);
    color: #86efac;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.tool-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: white;
}

.tool-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* File Summary Refined */
.file-summary-refined {
    background: var(--card-glass);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
}

.file-info-main {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.file-icon-large {
    font-size: 2rem;
    filter: drop-shadow(0 0 10px rgba(34, 197, 94, 0.3));
}

.file-details h3 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.remove-file-btn {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}

.remove-file-btn:hover {
    color: #dc2626;
    text-decoration: underline;
}

.file-stats-mini-grid {
    display: flex;
    gap: 1.5rem;
}

.mini-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.mini-stat .label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mini-stat .value {
    font-size: 1rem;
    font-weight: 600;
    color: white;
}

/* Enhanced Config Layout */
.config-card-enhanced {
    background: var(--card-glass);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 2.5rem;
    backdrop-filter: blur(20px);
}

.config-grid-enhanced {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.column-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 1rem;
}

.column-header h3 {
    color: white;
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
}

.column-header .subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Enhanced Toggle Row */
.toggle-row-enhanced {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.toggle-row-enhanced:hover {
    border-color: rgba(34, 197, 94, 0.3);
    background: var(--brand-green-soft);
}

.toggle-info {
    display: flex;
    flex-direction: column;
}

.toggle-title {
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-icon {
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: help;
}

.toggle-desc {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 0.2rem;
}

/* Animated Toggle */
.toggle-switch-animated {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.toggle-switch-animated input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-animated {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .4s;
    border-radius: 34px;
}

.slider-animated:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider-animated {
    background-color: var(--accent-purple);
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.4);
}

input:checked+.slider-animated:before {
    transform: translateX(22px);
}

/* Radio Cards Group */
.control-group-enhanced {
    margin-bottom: 2rem;
}

.group-label {
    display: block;
    color: white;
    font-weight: 600;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

.radio-cards-group {
    display: flex;
    gap: 1rem;
}

.radio-cards-group.small {
    gap: 0.8rem;
}

.radio-card {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    position: relative;
    overflow: hidden;
}

.radio-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.radio-card.active {
    background: var(--brand-green-soft);
    border-color: var(--accent-purple);
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.2);
}

.radio-circle {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--text-muted);
    position: relative;
    transition: all 0.2s;
}

.radio-card.active .radio-circle {
    border-color: var(--accent-purple);
}

.radio-card.active .radio-circle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: var(--accent-purple);
    border-radius: 50%;
}

.radio-label {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
}

.radio-card.active .radio-label {
    color: white;
    font-weight: 600;
}

/* Dropdowns */
.dropdown-row {
    display: flex;
    gap: 1rem;
}

.dropdown-wrapper {
    flex: 1;
}

.dropdown-wrapper label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.styled-dropdown {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-glass);
    color: white;
    padding: 0.8rem;
    border-radius: 12px;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
}

.styled-dropdown:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

.styled-dropdown option {
    background: #0c1610;
    color: white;
}

/* Layout Preview */
.layout-preview-enhanced {
    margin-top: 2rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px dashed var(--border-glass);
    border-radius: 16px;
    height: 220px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.preview-canvas {
    width: 140px;
    height: 180px;
    background: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    padding: 4px;
    gap: 2px;
}

.preview-page {
    background: #e2e8f0;
    border: 1px solid #cbd5e1;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

.preview-badge {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: var(--brand-green-soft);
    color: #86efac;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

/* Logo Remove Section */
.logo-remove-section {
    margin-top: 2rem;
    border-top: 1px solid var(--border-glass);
    padding-top: 1.5rem;
}

.logo-status {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1rem;
    animation: fadeIn 0.3s ease;
}

.status-text {
    color: #34d399;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.meta-text {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 0.8rem;
}

.edit-region-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.edit-region-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Page Selection UI (Step 2) */
.selection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.selection-info h3 {
    color: white;
    margin-bottom: 0.2rem;
}

.selection-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.selection-controls {
    display: flex;
    gap: 0.5rem;
}

.pages-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    max-height: 500px;
    overflow-y: auto;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    margin-bottom: 2rem;
}

/* Disabled State */
.disabled-section {
    opacity: 0.5;
    pointer-events: none;
    filter: grayscale(1);
    position: relative;
}

.disabled-section::after {
    content: "Not available for Original size";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    pointer-events: none;
    white-space: nowrap;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;

    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: #1a1a2e;
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 24px;
    width: 100%;
    max-width: 600px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: white;
    margin: 0;
}

.close-modal-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.modal-controls {
    text-align: right;
    margin-top: 0.2rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-glass);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Action Bar */
.action-bar-enhanced {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-glass);
}

.back-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: white;
}

/* =========================================
   MOBILE RESPONSIVENESS & TOUCH OPTIMIZATION
   ========================================= */

@media (max-width: 768px) {

    /* 1) Layout & Containers */
    .processing-container {
        padding-top: 6rem;
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .upload-card-modern,
    .support-card,
    .config-card-enhanced {
        padding: 1.5rem;
        border-radius: 20px;
    }

    body {
        overflow-x: hidden;
    }

    /* 2) Stepper UI */
    .stepper-container {
        flex-direction: row;
        align-items: flex-start;
        gap: 1.5rem;
        margin-bottom: 3rem;
        padding-left: 1rem;
    }

    .step-item {
        width: 100%;
        justify-content: flex-start;
    }

    .step-circle {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
        flex-shrink: 0;
    }

    /* Hide horizontal lines in vertical mode */
    .step-line-new {
        display: none;
    }

    /* 3) Grid to Stack Conversion */
    .config-grid-enhanced {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .tools-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .radio-cards-group {
        flex-direction: column;
        gap: 1rem;
    }

    .dropdown-row {
        flex-direction: column;
        gap: 1rem;
    }

    .file-summary-refined {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
        padding: 1.5rem;
    }

    /* 4) Buttons & Touch Optimization */
    button,
    .btn-secondary,
    .btn-youtube,
    .radio-card,
    .upload-zone-modern,
    .styled-dropdown,
    .edit-region-btn {
        min-height: 48px;
        /* Touch friendly */
    }

    .support-buttons {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }

    .btn-youtube,
    .btn-secondary {
        width: 100%;
        justify-content: center;
        display: flex;
        align-items: center;
    }

    .action-bar-enhanced {
        flex-direction: column-reverse;
        gap: 1.5rem;
    }

    .action-bar-enhanced button {
        width: 100%;
    }

    .back-link {
        margin-top: 1rem;
        display: block;
        padding: 1rem;
        text-align: center;
    }

    /* 5) Typography Adjustments */
    .process-hero h1 {
        font-size: 2.2rem;
    }

    .process-hero .subtitle {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .column-header h3 {
        font-size: 1.2rem;
    }

    .file-details h3 {
        font-size: 1.1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 250px;
        margin: 0 auto 0.5rem;
    }

    .radio-label {
        font-size: 1rem;
    }

    .mini-stat .label {
        font-size: 0.7rem;
    }

    .mini-stat .value {
        font-size: 0.95rem;
    }

    /* 6) File Summary Section */
    .file-info-main {
        flex-direction: column;
        gap: 1rem;
    }

    .file-stats-mini-grid {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1.5rem;
        width: 100%;
    }

    .mini-stat {
        align-items: center;
        flex: 1;
        min-width: 80px;
    }

    /* 7) Modal Responsiveness */
    .modal-content {
        max-height: 95vh;
        width: 95%;
        margin: 0 auto;
    }

    .modal-body {
        padding: 1rem;
    }

    .modal-footer {
        flex-direction: column;
        gap: 0.8rem;
    }

    .modal-footer button {
        width: 100%;
        margin: 0;
    }

    /* 8) Page Selection Grid */
    .pages-grid-container {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        max-height: 400px;
    }

    .selection-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .selection-controls {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .processing-container {
        padding-top: 5rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .process-hero h1 {
        font-size: 1.8rem;
    }

    .upload-card-modern {
        padding: 1.2rem;
    }

    .upload-icon-large {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }

    .tool-card {
        padding: 1.5rem;
    }

    .file-details h3 {
        max-width: 200px;
    }
}