/* ==================== PASSPORT SIZE PHOTO MAKER - COMPLETE STYLES ==================== */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

/* ==================== MAIN CONTAINER ==================== */
.passport-photo-container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.passport-photo-wrapper {
    max-width: 100%;
    margin: 0 auto;
}

/* ==================== HEADER SECTION ==================== */
.passport-photo-title {
    font-size: 3rem;
    font-weight: 800;
    font-family: 'Poppins', sans-serif;
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--text);
    letter-spacing: -0.02em;
}

.passport-photo-icon {
    font-size: 2.8rem;
    display: inline-block;
    animation: passportFloat 3s infinite;
}

@keyframes passportFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.passport-photo-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    font-family: 'Poppins', sans-serif;
}

/* ==================== MAIN CARD ==================== */
.passport-photo-card {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 2rem;
    box-shadow: var(--shadow);
}

/* ==================== LAYOUT ==================== */
.passport-photo-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 2rem;
}

/* ==================== CONTROLS ==================== */
.passport-photo-controls {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-height: 800px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.passport-photo-controls::-webkit-scrollbar {
    width: 6px;
}

.passport-photo-controls::-webkit-scrollbar-track {
    background: var(--bg);
    border-radius: 10px;
}

.passport-photo-controls::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

.passport-photo-section {
    background: var(--bg);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--border);
}

.passport-photo-section-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.8rem;
}

.passport-photo-subsection {
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 1px dashed var(--border);
}

.passport-photo-subsection-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.6rem;
}

.passport-photo-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-light);
    margin: 0.4rem 0 0.2rem;
    line-height: 1.4;
}

/* ==================== UPLOAD AREA ==================== */
.passport-photo-upload-area {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 2rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.passport-photo-upload-area:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.passport-photo-upload-area.dragover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.passport-photo-upload-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.5rem;
}

.passport-photo-upload-content p {
    margin: 0.5rem 0;
    color: var(--text);
    font-size: 0.95rem;
}

.passport-photo-upload-content small {
    color: var(--text-light);
    font-size: 0.8rem;
}

.passport-photo-upload-preview {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

.passport-photo-upload-preview img {
    width: 100%;
    max-height: 200px;
    object-fit: contain;
    display: block;
}

.passport-photo-remove-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(220, 38, 38, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s;
}

.passport-photo-remove-btn:hover {
    background: var(--error);
    transform: scale(1.1);
}

/* ==================== CONTROLS ==================== */
.passport-photo-control-group {
    margin-bottom: 0.8rem;
}

.passport-photo-control-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-light);
    margin-bottom: 0.3rem;
}

.passport-photo-control-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

.passport-photo-input {
    width: 100%;
    padding: 0.5rem 0.8rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.9rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s;
}

.passport-photo-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.passport-photo-select {
    width: 100%;
    padding: 0.5rem 0.8rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.85rem;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
}

.passport-photo-select:focus {
    outline: none;
    border-color: var(--primary);
}

.passport-photo-color {
    width: 100%;
    height: 40px;
    padding: 2px;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    background: var(--surface);
    margin-top: 0.5rem;
}

.passport-photo-range {
    width: calc(100% - 50px);
    vertical-align: middle;
    accent-color: var(--primary);
}

.passport-photo-range:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.passport-photo-range + span {
    display: inline-block;
    width: 45px;
    text-align: right;
    font-size: 0.8rem;
    color: var(--text-light);
}

/* ==================== PRESET NOTE ==================== */
.passport-photo-preset-note {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    font-size: 0.78rem;
    color: var(--text-light);
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.passport-photo-bg-dot {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid var(--border);
    margin-top: 2px;
    background: #ffffff;
}

/* ==================== SWATCHES ==================== */
.passport-photo-swatches {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.passport-photo-swatch {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}

.passport-photo-swatch:hover {
    transform: scale(1.1);
}

.passport-photo-swatch.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* ==================== BUTTONS ==================== */
.passport-photo-primary-btn {
    padding: 0.7rem 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
}

.passport-photo-primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.passport-photo-primary-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.passport-photo-action-btn {
    padding: 0.6rem 1.2rem;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 50px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
}

.passport-photo-action-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.passport-photo-action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
    background: transparent !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
}

.passport-photo-full-btn {
    width: 100%;
    text-align: center;
    margin-top: 0.3rem;
}

.passport-photo-small-btn {
    width: 100%;
    padding: 0.4rem;
    font-size: 0.8rem;
    margin-top: 0.3rem;
}

/* ==================== CHECKLIST ==================== */
.passport-photo-checklist {
    list-style: none;
    margin: 0;
    padding: 0;
}

.passport-photo-checklist li {
    margin-bottom: 0.5rem;
}

.passport-photo-checklist label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--text);
    cursor: pointer;
    font-weight: 400;
}

.passport-photo-checklist input[type="checkbox"] {
    margin-top: 3px;
    width: auto;
    accent-color: var(--primary);
    flex-shrink: 0;
}

.passport-photo-checklist li.checked label span {
    color: var(--text-light);
    text-decoration: line-through;
}

/* ==================== PREVIEW ==================== */
.passport-photo-preview {
    background: var(--bg);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.passport-photo-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.passport-photo-preview-header h3 {
    font-size: 1rem;
    color: var(--text);
}

.passport-photo-preview-actions {
    display: flex;
    gap: 0.5rem;
}

.passport-photo-preview-btn {
    padding: 0.3rem 0.8rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s;
    font-family: 'Poppins', sans-serif;
}

.passport-photo-preview-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.passport-photo-preview-container {
    flex: 1;
    background: var(--surface);
    border-radius: 12px;
    overflow: auto;
    min-height: 400px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
}

.passport-photo-preview-container canvas {
    max-width: 100%;
    max-height: 600px;
    object-fit: contain;
    cursor: move;
}

.passport-photo-preview-info {
    margin-top: 0.8rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-light);
}

/* ==================== FOOTER NOTE ==================== */
.passport-photo-footer-note {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-light);
}

.passport-photo-footer-note p {
    margin: 0.3rem 0;
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 1024px) {
    .passport-photo-layout {
        grid-template-columns: 1fr;
    }

    .passport-photo-controls {
        max-height: none;
        overflow-y: visible;
    }

    .passport-photo-preview-container {
        min-height: 300px;
    }
}

@media (max-width: 768px) {
    .passport-photo-container {
        padding: 0 1rem;
    }

    .passport-photo-title {
        font-size: 2rem;
    }

    .passport-photo-card {
        padding: 1rem;
    }

    .passport-photo-control-row {
        grid-template-columns: 1fr;
    }

    .passport-photo-preview-container {
        min-height: 250px;
    }

    .passport-photo-preview-container canvas {
        max-height: 400px;
    }
}

@media (max-width: 480px) {
    .passport-photo-title {
        font-size: 1.5rem;
    }

    .passport-photo-preview-header {
        flex-direction: column;
        align-items: stretch;
    }

    .passport-photo-preview-actions {
        justify-content: center;
    }
}

/* ==================== ACCESSIBILITY ==================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.passport-photo-input:focus-visible,
.passport-photo-select:focus-visible,
.passport-photo-primary-btn:focus-visible,
.passport-photo-action-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ==================== SCROLLBAR STYLING ==================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}