/**
 * Product Recommendation Quiz Frontend Styles
 */

/* Quiz Container */
.prq-quiz-container {
    max-width: 800px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Quiz Header */
.prq-quiz-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 40px 30px;
    text-align: center;
}

.prq-quiz-title {
    font-size: 2.5em;
    font-weight: 700;
    margin: 0 0 15px 0;
    line-height: 1.2;
}

.prq-quiz-description {
    font-size: 1.1em;
    opacity: 0.9;
    margin: 0;
    line-height: 1.5;
}

/* Progress Bar */
.prq-progress-container {
    background: #f8f9fa;
    padding: 20px 30px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.prq-progress-bar {
    flex: 1;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.prq-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.3s ease;
}

.prq-progress-text {
    font-weight: 600;
    color: #495057;
    min-width: 40px;
}

/* Questions */
.prq-question {
    padding: 40px 30px;
}

.prq-question-content {
    text-align: center;
    margin-bottom: 40px;
}

.prq-question-title {
    font-size: 1.8em;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 30px 0;
    line-height: 1.3;
}

/* Answer Options */
.prq-answers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.prq-answer-option {
    position: relative;
    cursor: pointer;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    background: #fff;
    transition: all 0.3s ease;
    display: block;
}

.prq-answer-option:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.prq-answer-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.prq-answer-option input[type="radio"]:checked + .prq-answer-content {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border-color: #667eea;
}

.prq-answer-content {
    text-align: center;
    padding: 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.prq-answer-text {
    font-size: 1.1em;
    font-weight: 500;
    display: block;
}

/* Navigation Buttons */
.prq-question-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.prq-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.prq-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.prq-btn-prev {
    background: #6c757d;
    color: #fff;
}

.prq-btn-prev:hover:not(:disabled) {
    background: #5a6268;
}

.prq-btn-next, .prq-btn-submit {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
}

.prq-btn-next:hover:not(:disabled), .prq-btn-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.prq-btn-next.enabled, .prq-btn-submit.enabled {
    opacity: 1 !important;
    cursor: pointer !important;
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    color: #fff !important;
}

.prq-btn-restart {
    background: #28a745;
    color: #fff;
}

.prq-btn-restart:hover {
    background: #218838;
}

.prq-btn-icon {
    font-size: 1.1em;
}

/* Results Section */
.prq-results {
    padding: 40px 30px;
    text-align: center;
}

.prq-results-header h3 {
    font-size: 2em;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 15px 0;
}

.prq-results-header p {
    font-size: 1.1em;
    color: #6c757d;
    margin: 0 0 30px 0;
}

.prq-recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Product Cards */
.prq-product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.prq-product-card:hover {
    transform: translateY(-5px);
}

.prq-product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.prq-product-info {
    padding: 20px;
}

.prq-product-title {
    font-size: 1.2em;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 10px 0;
}

.prq-product-price {
    font-size: 1.1em;
    font-weight: 700;
    color: #667eea;
    margin: 0 0 10px 0;
}

.prq-product-excerpt {
    font-size: 0.9em;
    color: #6c757d;
    line-height: 1.4;
    margin: 0;
}

.prq-results-actions {
    margin-top: 30px;
}

/* Loading State */
.prq-loading {
    padding: 60px 30px;
    text-align: center;
}

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

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

/* Error Messages */
.prq-error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    margin: 15px;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
}

.prq-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.prq-no-results h4 {
    margin: 0 0 10px 0;
    color: #495057;
}

/* Responsive Design */
@media (max-width: 768px) {
    .prq-quiz-container {
        margin: 0 15px;
        border-radius: 8px;
    }
    
    .prq-quiz-header {
        padding: 30px 20px;
    }
    
    .prq-quiz-title {
        font-size: 2em;
    }
    
    .prq-question {
        padding: 30px 20px;
    }
    
    .prq-question-title {
        font-size: 1.5em;
    }
    
    .prq-answers-grid {
        grid-template-columns: 1fr;
    }
    
    .prq-question-navigation {
        flex-direction: column;
    }
    
    .prq-btn {
        width: 100%;
        justify-content: center;
    }
    
    .prq-recommendations-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .prq-quiz-title {
        font-size: 1.8em;
    }
    
    .prq-question-title {
        font-size: 1.3em;
    }
    
    .prq-answer-text {
        font-size: 1em;
    }
}

/* Admin Styles */
.prq-admin-container {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.prq-admin-header {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.prq-admin-title {
    font-size: 1.5em;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.prq-admin-description {
    color: #6c757d;
    margin: 10px 0 0 0;
}

/* Form Styles */
.prq-form-group {
    margin-bottom: 20px;
}

.prq-form-label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.prq-form-input,
.prq-form-textarea,
.prq-form-select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

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

.prq-form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* Button Styles */
.prq-btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.prq-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.prq-btn-secondary {
    background: #6c757d;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.prq-btn-secondary:hover {
    background: #5a6268;
}

.prq-btn-danger {
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.prq-btn-danger:hover {
    background: #c82333;
}

/* Utility Classes */
.prq-text-center {
    text-align: center;
}

.prq-text-left {
    text-align: left;
}

.prq-text-right {
    text-align: right;
}

.prq-mt-20 {
    margin-top: 20px;
}

.prq-mb-20 {
    margin-bottom: 20px;
}

.prq-ml-10 {
    margin-left: 10px;
}

.prq-mr-10 {
    margin-right: 10px;
}

.prq-p-20 {
    padding: 20px;
}

.prq-d-none {
    display: none;
}

.prq-d-block {
    display: block;
}

.prq-d-flex {
    display: flex;
}

.prq-align-center {
    align-items: center;
}

.prq-justify-between {
    justify-content: space-between;
}

.prq-justify-center {
    justify-content: center;
} 