/* AI Passport Photo Maker - Complete Styles */

/* Affiliate Banners */
.affiliate-banners {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 15px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.banner-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.hostinger-banner {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%) !important;
    border-color: #7b1fa2 !important;
}

.hostinger-banner:hover {
    background: linear-gradient(135deg, #e1bee7 0%, #ce93d8 100%) !important;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(123, 31, 162, 0.3);
}

.amazon-banner {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%) !important;
    border-color: #f57c00 !important;
}

.amazon-banner:hover {
    background: linear-gradient(135deg, #ffe0b2 0%, #ffcc80 100%) !important;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(245, 124, 0, 0.3);
}

.banner-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.banner-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.hostinger-banner .banner-icon {
    background: linear-gradient(135deg, #673DE6, #8B5CF6);
}

.amazon-banner .banner-icon {
    background: linear-gradient(135deg, #FF9900, #FF6600);
}

.banner-text {
    flex: 1;
}

.banner-text h4 {
    font-size: 1rem;
    color: #2d3748;
    margin-bottom: 3px;
    font-weight: 700;
}

.banner-text p {
    font-size: 0.85rem;
    color: #718096;
    margin: 0;
}

.banner-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.banner-btn:hover {
    transform: scale(1.05);
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 40px 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.95;
}

/* Hidden Class */
.hidden {
    display: none !important;
}

/* Upload Section */
.upload-section {
    padding: 60px 0;
    max-width: 800px;
    margin: 0 auto;
}

.upload-box {
    background: white;
    border-radius: 20px;
    padding: 60px 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    text-align: center;
    border: 3px dashed #e2e8f0;
    transition: all 0.3s ease;
}

.upload-box:hover {
    border-color: #667eea;
}

.upload-box i {
    font-size: 5rem;
    color: #667eea;
    margin-bottom: 20px;
    display: block;
}

.upload-box h2 {
    font-size: 2rem;
    color: #2d3748;
    margin-bottom: 10px;
}

.upload-box p {
    color: #718096;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.file-info {
    margin-top: 20px;
    font-size: 0.9rem;
    color: #a0aec0;
}

/* Editor Section */
.editor-section {
    padding: 50px 0;
    max-width: 1600px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 500px;
    gap: 30px;
}

/* Preview & Controls Panel */
.preview-controls-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.preview-box,
.feature-box,
.size-selection-box,
.sheet-preview-box {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

.preview-box h3,
.feature-box h4,
.size-selection-box h3,
.sheet-preview-box h3 {
    font-size: 1.3rem;
    color: #2d3748;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 15px;
    border-bottom: 3px solid #e2e8f0;
}

.feature-box h4 {
    font-size: 1.1rem;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.hint-text {
    text-align: center;
    color: #718096;
    font-size: 0.9rem;
    margin-bottom: 15px;
    font-style: italic;
}

/* Passport Preview Container */
/* CRITICAL FIX - Ensure container has size */
.passport-preview-container {
    position: relative;
    width: 100%;
    height: 600px; /* Fixed height */
    min-height: 600px; /* Ensure minimum height */
    background: #1a202c;
    border-radius: 15px;
    overflow: hidden;
    cursor: grab;
    margin-bottom: 20px;
}


.passport-preview-container:active {
    cursor: grabbing;
}

#imageCanvas {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: none;
    max-height: none;
}

/* Passport Box Overlay */
.passport-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 3px solid #48bb78;
    background: rgba(72, 187, 120, 0.1);
    pointer-events: none;
    z-index: 10;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.6);
}

.passport-box-label {
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: #48bb78;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Crop Grid Lines */
.crop-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.grid-line {
    position: absolute;
    background: rgba(255, 255, 255, 0.4);
}

.grid-line.h1, .grid-line.h2 {
    height: 1px;
    left: 0;
    right: 0;
}

.grid-line.h1 { top: 33.33%; }
.grid-line.h2 { top: 66.66%; }

.grid-line.v1, .grid-line.v2 {
    width: 1px;
    top: 0;
    bottom: 0;
}

.grid-line.v1 { left: 33.33%; }
.grid-line.v2 { left: 66.66%; }

/* Preview Info */
.preview-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 15px 0;
    padding: 15px;
    background: #f7fafc;
    border-radius: 10px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #4a5568;
}

.info-item i {
    color: #667eea;
    font-size: 1.1rem;
}

/* Buttons */
.btn {
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    width: 100%;
    background: #718096;
    color: white;
    font-size: 1rem;
    padding: 12px 20px;
}

.btn-secondary:hover {
    background: #4a5568;
}

.btn-feature {
    width: 100%;
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
    font-size: 1rem;
    padding: 14px 20px;
}

.btn-feature:hover {
    background: linear-gradient(135deg, #38a169, #2f855a);
    transform: translateY(-2px);
}

.btn-reset {
    width: 100%;
    background: #718096;
    color: white;
    font-size: 1rem;
    padding: 14px 20px;
}

.btn-reset:hover {
    background: #4a5568;
}

.btn-generate {
    width: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-size: 1.2rem;
    padding: 18px 40px;
    margin: 20px 0;
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-download {
    width: 100%;
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
    font-size: 1.2rem;
    padding: 18px 40px;
    margin-top: 20px;
}

.btn-download:hover {
    background: linear-gradient(135deg, #38a169, #2f855a);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(72, 187, 120, 0.4);
}

/* Feature Hint */
.feature-hint {
    margin-top: 10px;
    font-size: 0.85rem;
    color: #718096;
    font-style: italic;
}

/* Color Grid */
.color-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.color-box {
    width: 100%;
    height: 60px;
    border-radius: 10px;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.color-box:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.color-box.active {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
}

.color-box.custom {
    background: linear-gradient(135deg, 
        red, orange, yellow, green, 
        blue, indigo, violet);
    display: flex;
    align-items: center;
    justify-content: center;
}

.color-box.custom input[type="color"] {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.color-box.custom i {
    color: white;
    font-size: 1.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    pointer-events: none;
}

/* Sliders */
.feature-box label {
    display: block;
    color: #4a5568;
    font-weight: 600;
    margin: 15px 0 8px;
    font-size: 0.95rem;
}

.feature-box label:first-of-type {
    margin-top: 0;
}

.feature-box label span {
    float: right;
    color: #667eea;
    font-weight: 700;
}

.slider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #e2e8f0;
    outline: none;
    margin: 10px 0;
    -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Size Selection */
.sheet-selection-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.size-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.size-option {
    border: 3px solid #e2e8f0;
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
}

.size-option:hover {
    border-color: #667eea;
    background: #f7fafc;
}

.size-option input[type="radio"]:checked ~ .size-content {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
}

.size-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.size-content {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.size-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.size-details {
    flex: 1;
}

.size-details strong {
    display: block;
    font-size: 1.1rem;
    color: #2d3748;
    margin-bottom: 5px;
}

.size-details span {
    display: block;
    color: #718096;
    font-size: 0.9rem;
    margin-bottom: 3px;
}

.size-details .price {
    color: #667eea;
    font-weight: 700;
    font-size: 1rem;
    margin-top: 5px;
}

/* Sheet Preview */
.sheet-canvas-wrapper {
    width: 100%;
    min-height: 400px;
    background: #f7fafc;
    border: 3px solid #e2e8f0;
    border-radius: 15px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
}

.sheet-canvas-wrapper canvas {
    max-width: 100%;
    max-height: 600px;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

/* Sheet Info */
.sheet-info {
    background: #f7fafc;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
}

.info-row:last-child {
    border-bottom: none;
}

.info-row span {
    color: #718096;
    font-size: 0.95rem;
}

.info-row strong {
    color: #2d3748;
    font-size: 1rem;
    font-weight: 600;
}

.info-row.price-row {
    background: linear-gradient(135deg, #667eea, #764ba2);
    margin: 15px -20px -20px;
    padding: 15px 20px;
    border-radius: 0 0 12px 12px;
    border-bottom: none;
}

.info-row.price-row span,
.info-row.price-row strong {
    color: white;
}

.info-row.price-row strong {
    font-size: 1.3rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .editor-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 968px) {
    .banner-container {
        grid-template-columns: 1fr;
    }
    
    .preview-info {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .upload-box {
        padding: 40px 20px;
    }
    
    .passport-preview-container {
        height: 400px;
    }
    
    .page-header h1 {
        font-size: 1.8rem;
    }
}

