/* Quotation Builder Frontend Styles */

.quotation-builder-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Progress Bar */
.qb-progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    margin-bottom: 30px;
    overflow: hidden;
}

.qb-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FE4E05 0%, #e63e00 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

/* Form Styles */
.qb-form {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 40px;
    margin-bottom: 30px;
}

.qb-step {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.qb-step.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.qb-step-title {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 30px;
    text-align: center;
    position: relative;
}

.qb-step-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #FE4E05 0%, #e63e00 100%);
    border-radius: 2px;
}

/* Question Styles */
.qb-question {
    margin-bottom: 40px;
}

.qb-question-label {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
    line-height: 1.4;
}

/* Text Input Styles */
.qb-text-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fff;
    margin-top: 8px;
}

.qb-text-input:focus {
    outline: none;
    border-color: #FE4E05;
    box-shadow: 0 0 0 3px rgba(254, 78, 5, 0.1);
    transform: translateY(-1px);
}

.qb-text-input::placeholder {
    color: #adb5bd;
    font-style: italic;
}

/* Answer Options */
.qb-answers {
    display: grid;
    gap: 15px;
    margin-bottom: 20px;
}

.qb-single-choice {
    grid-template-columns: 1fr;
}

.qb-multi-choice {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.qb-answer-option {
    display: flex;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.qb-answer-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(135deg, #FE4E05 0%, #e63e00 100%);
    transition: width 0.3s ease;
    z-index: 0;
}

.qb-answer-option:hover {
    border-color: #FE4E05;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(254, 78, 5, 0.15);
}

.qb-answer-option:hover::before {
    width: 100%;
}

.qb-answer-option input[type="radio"],
.qb-answer-option input[type="checkbox"] {
    margin-right: 15px;
    width: 20px;
    height: 20px;
    accent-color: #FE4E05;
    position: relative;
    z-index: 1;
}

.qb-answer-option input[type="radio"]:checked + .qb-answer-label,
.qb-answer-option input[type="checkbox"]:checked + .qb-answer-label {
    color: #fff;
    font-weight: 600;
}

.qb-answer-option:has(input[type="radio"]:checked),
.qb-answer-option:has(input[type="checkbox"]:checked) {
    border-color: #FE4E05;
    background: linear-gradient(135deg, #FE4E05 0%, #e63e00 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(254, 78, 5, 0.3);
}

.qb-answer-option:has(input[type="radio"]:checked)::before,
.qb-answer-option:has(input[type="checkbox"]:checked)::before {
    width: 100%;
}

.qb-answer-label {
    font-size: 16px;
    font-weight: 500;
    color: #495057;
    transition: color 0.3s ease;
    position: relative;
    z-index: 1;
    flex: 1;
}

/* Navigation Buttons */
.qb-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e9ecef;
}

.qb-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 120px;
}

.qb-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.qb-btn-primary {
    background: linear-gradient(135deg, #FE4E05 0%, #e63e00 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(254, 78, 5, 0.3);
}

.qb-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(254, 78, 5, 0.4);
}

.qb-btn-secondary {
    background: #6c757d;
    color: #fff;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.qb-btn-secondary:hover:not(:disabled) {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 117, 125, 0.4);
}

.qb-btn-large {
    padding: 20px 40px;
    font-size: 18px;
    min-width: 200px;
}

/* Result Display */
.qb-result {
    background: linear-gradient(135deg, #FE4E05 0%, #e63e00 100%);
    color: #fff;
    padding: 50px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 8px 30px rgba(254, 78, 5, 0.3);
    animation: slideInUp 0.5s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.qb-logo {
    margin-bottom: 30px;
}

.qb-logo-img {
    max-width: 300px;
    height: auto;
    filter: brightness(0) invert(1);
}

.qb-result h3 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #fff;
}

.qb-success-message {
    font-size: 18px;
    margin: 20px 0;
    line-height: 1.6;
}

.qb-email-notice {
    font-size: 16px;
    opacity: 0.9;
    margin: 20px 0 30px;
    font-style: italic;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
}

.qb-result-actions {
    margin-top: 30px;
}

/* Error States */
.qb-error {
    background: #f8d7da;
    color: #721c24;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
    text-align: center;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .quotation-builder-container {
        padding: 15px;
    }
    
    .qb-form {
        padding: 25px;
    }
    
    .qb-step-title {
        font-size: 24px;
    }
    
    .qb-question-label {
        font-size: 16px;
    }
    
    .qb-multi-choice {
        grid-template-columns: 1fr;
    }
    
    .qb-answer-option {
        padding: 15px;
    }
    
    .qb-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .qb-btn {
        width: 100%;
        min-width: auto;
    }
    
    .qb-result {
        padding: 30px 20px;
    }
    
    .qb-price-display {
        font-size: 36px;
    }
}

@media (max-width: 480px) {
    .qb-form {
        padding: 20px;
    }
    
    .qb-step-title {
        font-size: 20px;
    }
    
    .qb-answer-option {
        padding: 12px;
    }
    
    .qb-answer-label {
        font-size: 14px;
    }
    
    .qb-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* Loading States */
.qb-loading {
    opacity: 0.7;
    pointer-events: none;
}

.qb-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Focus States for Accessibility */
.qb-answer-option:focus-within {
    outline: 3px solid rgba(254, 78, 5, 0.5);
    outline-offset: 2px;
}

.qb-btn:focus {
    outline: 3px solid rgba(254, 78, 5, 0.5);
    outline-offset: 2px;
}

.qb-text-input:focus {
    outline: 3px solid rgba(254, 78, 5, 0.5);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .qb-navigation,
    .qb-result {
        display: none;
    }
    
    .qb-step {
        display: block !important;
        page-break-inside: avoid;
    }
}
