/**
 * FiveFlavours Quiz Styles v2.0
 */

/* ===================================
   CONTAINER
   =================================== */
#ff-quiz-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* ===================================
   PROGRESS CIRCLE
   =================================== */
#ff-quiz-progress {
    position: relative;
    margin-bottom: 40px;
}

#ff-progress-circle {
    display: block;
    margin: 0 auto;
}

#ff-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

/* ===================================
   QUESTIONS
   =================================== */
.ff-question {
    margin-bottom: 30px;
}

.ff-question h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

/* ===================================
   CHIP CONTAINER (OPTIONS)
   =================================== */
.chip-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin: 20px 0;
}

.chip {
    padding: 12px 20px;
    border: 2px solid #000;
    border-radius: 25px;
    background: #000;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 15px;
    color: #fff;
    user-select: none;
}

.chip:hover {
    background: #ff6900;
    border-color: #ff6900;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 128, 2, 0.3);
}

.chip.selected {
    background: #ff6900;
    border-color: #ff6900;
    color: #000;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(255, 128, 2, 0.4);
}

/* ===================================
   NAVIGATION
   =================================== */
#ff-quiz-navigation {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding: 20px 0;
}

#ff-back-button,
#ff-next-button {
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

#ff-back-button {
    background: #f0f0f0;
    border: 1px solid #ddd;
    color: #333;
}

#ff-back-button:hover {
    background: #e0e0e0;
}

#ff-next-button {
    background: #ff6900;
    border: 1px solid #006799;
    color: #fff;
}

#ff-next-button:hover {
    background: #005177;
}

/* ===================================
   TIE BREAKER
   =================================== */
#ff-tie-breaker {
    text-align: center;
    padding: 40px 20px;
}

#ff-tie-breaker h3 {
    margin-bottom: 30px;
    color: #333;
}

#ff-tie-options {
    margin: 30px 0;
}

.tie-option {
    padding: 16px 24px;
    font-size: 16px;
    min-width: 200px;
}

#ff-tie-submit {
    padding: 14px 40px;
    font-size: 16px;
    background: #ff6900;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#ff-tie-submit:hover {
    background: #005177;
}

/* ===================================
   CHART
   =================================== */
#ff-chart-wrapper {
    text-align: center;
    padding: 40px 0;
}

#ff-result-chart {
    max-width: 100%;
    height: auto !important;
}

/* ===================================
   USER INFO FORM
   =================================== */
#ff-user-info {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#ff-user-info h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
}

#ff-user-info label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

#ff-user-info input[type="text"],
#ff-user-info input[type="email"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
}

#ff-user-info input:focus {
    outline: none;
    border-color: #ff6900;
    box-shadow: 0 0 0 3px rgba(0,115,170,0.1);
}

#ff-user-form button {
    margin-top: 20px;
    padding: 12px 30px;
    background: #ff6900;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

#ff-user-form button:hover {
    background: #005177;
}

/* ===================================
   LOADER
   =================================== */
#ff-loader {
    text-align: center;
    padding: 60px 20px;
}

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

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

#ff-loader p {
    font-size: 16px;
    color: #666;
}

/* ===================================
   ERROR MESSAGE
   =================================== */
.ff-error {
    background: #fee;
    border: 1px solid #f00;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
    color: #a00;
}

.ff-error strong {
    color: #f00;
}

/* ===================================
   RESULTS DISPLAY
   =================================== */
.ff-results-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.ff-results-container h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.ff-chart {
    margin: 40px 0;
}

.ff-profile-summary {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    margin: 30px 0;
}

.ff-profile-summary h3 {
    margin-top: 0;
    color: #333;
    font-size: 24px;
}

.ff-profile-summary p {
    font-size: 16px;
    line-height: 1.6;
    color: #555;
}

/* ===================================
   RESPONSIVE
   =================================== */
@media (max-width: 768px) {
    #ff-quiz-container {
        padding: 15px;
    }
    
    .ff-question h3 {
        font-size: 18px;
    }
    
    .chip {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .chip-container {
        gap: 8px;
    }
    
    #ff-progress-circle {
        width: 200px;
        height: 200px;
    }
    
    #ff-progress-text {
        font-size: 20px;
    }
    
    #ff-user-info {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .chip-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .chip {
        text-align: center;
    }
    
    #ff-quiz-navigation {
        flex-direction: column-reverse;
    }
    
    #ff-back-button,
    #ff-next-button {
        width: 100%;
    }
}