/* photobook.css - Photo Book Flow Styles */

.photobook-container {
    max-width: 900px;
    margin: 8rem auto 4rem;
    padding: 0 2rem;
}

.steps-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 3rem;
    gap: 0;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.progress-step .step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.progress-step.active .step-circle { background: var(--primary); color: white; }
.progress-step.done .step-circle { background: #28a745; color: white; }
.progress-step span { font-size: 0.75rem; color: #999; }
.progress-step.active span { color: var(--primary); font-weight: 600; }

.progress-line {
    width: 80px;
    height: 2px;
    background: #e0e0e0;
    margin-bottom: 1.5rem;
}

.step-panel {
    display: none;
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.step-panel.active { display: block; }
.step-panel h2 { font-size: 1.5rem; margin-bottom: 0.5rem; color: #333; }
.step-panel .step-desc { color: #666; margin-bottom: 2rem; }

.upload-zone {
    border: 2px dashed #ccc;
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    margin-bottom: 1.5rem;
}

.upload-zone:hover,
.upload-zone.drag-over { border-color: var(--primary); background: #fff8f5; }
.upload-zone .upload-icon { font-size: 3rem; margin-bottom: 1rem; }
.upload-zone h3 { margin-bottom: 0.5rem; color: #333; }
.upload-zone p { color: #999; font-size: 0.875rem; }

.photo-count-bar {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.photo-count-bar .count { font-size: 1.5rem; font-weight: 700; color: var(--primary); }
.photo-count-bar .count-label { font-size: 0.875rem; color: #666; }

.progress-bar {
    flex: 1;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    margin: 0 1rem;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.3s;
}

.photos-remaining-label { font-size: 0.875rem; color: #666; }

.photo-grid-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    max-height: 400px;
    overflow-y: auto;
}

.photo-thumb {
    aspect-ratio: 3/4;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    background: #f0f0f0;
}

.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }

.photo-thumb .remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    cursor: pointer;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-thumb .page-num {
    position: absolute;
    bottom: 4px;
    left: 4px;
    background: rgba(0,0,0,0.5);
    color: white;
    font-size: 0.65rem;
    padding: 2px 5px;
    border-radius: 3px;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label { font-size: 0.875rem; font-weight: 600; color: #444; }

.form-group input,
.form-group select {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus { outline: none; border-color: var(--primary); }

.step-nav { display: flex; justify-content: space-between; margin-top: 2rem; gap: 1rem; }

.btn-back {
    background: #f0f0f0;
    color: #555;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    font-weight: 600;
}

.btn-next {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    font-weight: 600;
    flex: 1;
    transition: background 0.2s;
}

.btn-next:hover { background: #d4692a; }
.btn-next:disabled { background: #ccc; cursor: not-allowed; }

.order-summary { background: #f9f9f9; border-radius: 12px; padding: 1.5rem; margin-bottom: 1.5rem; }
.summary-row { display: flex; justify-content: space-between; padding: 0.5rem 0; font-size: 0.9rem; color: #555; }
.summary-row.total { border-top: 2px solid #eee; margin-top: 0.5rem; padding-top: 1rem; font-weight: 700; font-size: 1.1rem; color: #333; }

.payment-redirect { text-align: center; padding: 2rem; }
.payment-redirect .lock-icon { font-size: 3rem; margin-bottom: 1rem; }
.payment-redirect p { color: #666; }

/* Hide upload zone when full */
.upload-zone.is-full {
    display: none;
}

/* Larger thumbs on mobile */
@media (max-width: 768px) {
    .photo-grid-preview {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
}

/* Drag reorder cursor */
.photo-thumb {
    cursor: grab;
}

.photo-thumb.dragging {
    opacity: 0.4;
    cursor: grabbing;
}

/* Rotate button */
.photo-thumb .rotate-btn {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    cursor: pointer;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
