/* Passport Photo Maker Styles */

/* Main Container */
#passport-container {
    position: relative;
    padding: 20px;
    background: rgba(26, 26, 26, 0.95);
    border-radius: 16px;
    margin: 20px 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* Workspace Layout */
.passport-workspace {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
    align-items: start;
}

/* Photo Preview Section */
.photo-preview-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.image-wrapper {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 20px;
    border: 2px solid #3a3a3a;
}

.image-wrapper h5 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 16px;
    text-align: center;
    font-weight: 600;
}

/* Canvas Container */
.canvas-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    background: repeating-conic-gradient(#808080 0% 25%, transparent 0% 50%) 50% / 20px 20px;
    border-radius: 8px;
    overflow: hidden;
}

.preview-canvas {
    max-width: 100%;
    max-height: 500px;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Photo Info */
.photo-info {
    margin-top: 15px;
    padding: 10px 15px;
    background: #2a2a2a;
    border-radius: 8px;
    font-size: 13px;
    color: #b0b0b0;
    text-align: center;
}

.photo-info span {
    color: var(--primary-color);
    font-weight: 600;
}

/* Print Preview */
.print-preview-wrapper {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 20px;
    border: 2px solid #3a3a3a;
}

.print-preview-wrapper h5 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 14px;
    text-align: center;
}

.print-preview-container {
    background: #fff;
    border-radius: 4px;
    padding: 10px;
    display: flex;
    justify-content: center;
}

.print-canvas {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
}

/* Controls Section */
.controls-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Control Groups */
.control-group {
    background: #2a2a2a;
    padding: 15px;
    border-radius: 10px;
}

.control-group label {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    color: #e0e0e0;
    font-weight: 500;
}

.control-group label i {
    margin-right: 8px;
    color: var(--primary-color);
}

/* Photo Size Select */
#photo-size {
    width: 100%;
    padding: 10px 12px;
    background: #1a1a1a;
    border: 2px solid #444;
    color: #fff;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}

#photo-size:focus {
    border-color: var(--primary-color);
    outline: none;
}

#photo-size optgroup {
    background: #2a2a2a;
    color: var(--primary-color);
    font-weight: 600;
}

#photo-size option {
    background: #1a1a1a;
    color: #fff;
    padding: 8px;
}

/* Background Color Buttons */
.bg-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.bg-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 12px;
    background: #1a1a1a;
    border: 2px solid #444;
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
}

.bg-btn:hover {
    border-color: #666;
    background: #333;
}

.bg-btn.active {
    border-color: var(--primary-color);
    background: rgba(76, 175, 80, 0.15);
}

.color-swatch {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid #666;
}

.color-swatch.white {
    background: #ffffff;
}

.color-swatch.lightblue {
    background: #d4e8f2;
}

.color-swatch.gray {
    background: #e0e0e0;
}

.color-swatch.custom {
    background: linear-gradient(135deg, #ff6b6b, #4ecdc4, #45b7d1, #96e6a1);
}

/* Custom Color Picker */
#custom-color-picker {
    animation: fadeIn 0.3s ease;
}

.form-control-color {
    width: 100%;
    height: 40px;
    padding: 4px;
    background: #1a1a1a;
    border: 2px solid #444;
    border-radius: 8px;
    cursor: pointer;
}

/* Zoom Slider */
.form-range {
    width: 100%;
    height: 8px;
    background: #1a1a1a;
    border-radius: 4px;
    appearance: none;
}

.form-range::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s;
}

.form-range::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

/* Position Buttons */
.position-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.pos-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
    border: 2px solid #444;
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.pos-btn:hover {
    border-color: var(--primary-color);
    background: #333;
}

.pos-btn:active {
    transform: scale(0.95);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.action-buttons .btn {
    width: 100%;
    padding: 12px 20px;
    font-size: 15px;
    border-radius: 10px;
    font-weight: 600;
}

#remove-bg-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
}

#remove-bg-btn:hover {
    background: linear-gradient(135deg, #5a6fd6, #6a4190);
}

#download-btn {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    border: none;
}

#download-print-btn {
    background: linear-gradient(135deg, #17a2b8, #138496);
    border: none;
}

/* Tips Box */
.tips-box {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 10px;
    padding: 15px;
}

.tips-box h6 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 14px;
}

.tips-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tips-box li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    font-size: 12px;
    color: #b0b0b0;
    line-height: 1.4;
}

.tips-box li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #4CAF50;
}

/* Processing Overlay */
#processing-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    z-index: 10;
}

#processing-overlay p {
    color: #fff;
    margin-top: 15px;
    font-size: 14px;
}
 

/* Country Size Cards */
.size-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.size-card {
    background: #2a2a2a;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    border: 1px solid #3a3a3a;
    transition: all 0.3s;
}

.size-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.country-flag {
    font-size: 32px;
    margin-bottom: 10px;
}

.size-card h4 {
    color: #fff;
    font-size: 15px;
    margin-bottom: 8px;
}

.size-card p {
    color: #888;
    font-size: 12px;
    margin: 0;
    line-height: 1.5;
}

/* Close Button */
.btn-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 100;
}

.btn-close:hover {
    background: rgba(255, 0, 0, 0.3);
}

/* Responsive Design */
@media (max-width: 992px) {
    .passport-workspace {
        grid-template-columns: 1fr;
    }
    
    .controls-section {
        order: -1;
    }
    
    .bg-buttons {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 576px) {
    #passport-container {
        padding: 15px;
    }
    
    .bg-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .position-buttons {
        justify-content: space-between;
    }
    
    .pos-btn {
        width: 36px;
        height: 36px;
    }
    
    .upload-area {
        padding: 30px 20px;
    }
    
    .upload-icon {
        font-size: 48px;
    }
    
    .size-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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