/**
 * Frontend Styles - Birthday Flyer Creator
 */

/* Main Container */
.coco-flyer-creator {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Header */
.flyer-creator-header {
    text-align: center;
    margin-bottom: 40px;
}

.flyer-creator-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
}

.flyer-creator-header p {
    font-size: 16px;
    color: #7f8c8d;
}

/* Test Mode Notice */
.test-mode-notice {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    margin-bottom: 30px;
}

/* Form Steps */
.form-step {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.form-step.active {
    display: block;
    opacity: 1;
}

/* Step Header */
.step-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.step-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
}

.step-header h3 {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

/* Form Groups */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 15px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group small {
    display: block;
    color: #7f8c8d;
    font-size: 13px;
    margin-top: 5px;
}

/* Photo Upload Area */
.photo-upload-area {
    position: relative;
    min-height: 300px;
    cursor: pointer;
}

.upload-placeholder {
    border: 3px dashed #cbd5e0;
    border-radius: 12px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #f8f9fa;
}

.upload-placeholder:hover {
    border-color: #667eea;
    background: #f0f1ff;
}

.upload-icon {
    font-size: 64px;
    margin-bottom: 15px;
}

.upload-placeholder p {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.upload-placeholder small {
    color: #7f8c8d;
}

.photo-preview {
    text-align: center;
}

.photo-preview img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 15px;
}

.btn-remove-photo {
    padding: 10px 20px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.btn-remove-photo:hover {
    background: #c0392b;
}

/* Order Summary */
.order-summary {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin: 25px 0;
    border: 2px solid #e9ecef;
}

.order-summary h4 {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #dee2e6;
}

.summary-row .price {
    font-weight: 700;
    color: #2e7d32;
}

.summary-features {
    margin: 15px 0;
}

.summary-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.summary-features li {
    padding: 8px 0;
    color: #495057;
    font-size: 14px;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    padding-top: 15px;
    margin-top: 15px;
    border-top: 2px solid #dee2e6;
    font-size: 20px;
    font-weight: 700;
}

.total-price {
    color: #2e7d32;
    font-size: 24px;
}

/* Step Navigation */
.step-navigation {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-success {
    padding: 14px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    flex: 1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #e9ecef;
    color: #495057;
}

.btn-secondary:hover {
    background: #dee2e6;
}

.btn-success {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.4);
}

/* Messages */
.form-messages {
    margin-top: 20px;
}

.success-message,
.error-message {
    padding: 15px 20px;
    border-radius: 8px;
    font-weight: 600;
    margin-bottom: 15px;
}

.success-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.loading-message {
    text-align: center;
    padding: 30px;
}

/* Spinner */
.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 15px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-large {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border: 6px solid #f3f3f3;
    border-top: 6px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Preview Page Styles */
.flyer-preview-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.preview-header {
    text-align: center;
    margin-bottom: 40px;
}

.preview-header h1 {
    font-size: 36px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
}

.preview-header p {
    font-size: 16px;
    color: #7f8c8d;
}

.preview-content {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.flyer-display {
    text-align: center;
    margin-bottom: 40px;
}

.flyer-image {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    margin-bottom: 30px;
}

.flyer-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.approved-badge {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 16px;
}

.btn-download {
    padding: 16px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 16px;
    transition: transform 0.2s;
    display: inline-block;
}

.btn-download:hover {
    transform: translateY(-2px);
}

.download-note {
    color: #7f8c8d;
    font-size: 14px;
}

.btn-approve,
.btn-request-revision {
    padding: 16px 40px;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-approve {
    width: 100%;
    max-width: 400px;
}

.btn-request-revision {
    width: 100%;
    max-width: 400px;
}

.revisions-exhausted {
    color: #e74c3c;
    font-weight: 600;
}

/* Revision Panel */
.revision-panel {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    margin-top: 30px;
    border: 2px solid #e9ecef;
}

.revision-panel h3 {
    font-size: 22px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
}

.revision-panel p {
    color: #7f8c8d;
    margin-bottom: 20px;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.btn-cancel-revision {
    padding: 12px 24px;
    background: #e9ecef;
    color: #495057;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

/* Revision History */
.revision-history {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e9ecef;
}

.revision-history h3 {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
}

.revision-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #667eea;
}

.revision-number {
    font-weight: 700;
    color: #667eea;
    margin-bottom: 8px;
}

.revision-details p {
    margin: 8px 0;
    color: #495057;
}

.photo-changed-badge {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 8px;
}

.revision-details small {
    color: #7f8c8d;
    font-size: 13px;
}

/* Status States */
.generating-state,
.error-state,
.pending-payment {
    text-align: center;
    padding: 60px 20px;
}

.generating-state h2,
.error-state h2,
.pending-payment h2 {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
}

.generating-state p,
.error-state p,
.pending-payment p {
    font-size: 16px;
    color: #7f8c8d;
    margin-bottom: 10px;
}

.error-icon,
.pending-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .flyer-creator-header h2 {
        font-size: 24px;
    }
    
    .step-navigation {
        flex-direction: column;
    }
    
    .preview-content {
        padding: 20px;
    }
    
    .form-actions {
        flex-direction: column;
    }
}

