/* RevBridge Quiz - Frontend Styles */

/* Reset e Base */
.rbq-quiz-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.6;
    color: #333;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

.rbq-quiz-container * {
    box-sizing: border-box;
}

/* Container Principal */
.rbq-quiz-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Header do Quiz */
.rbq-quiz-header {
    padding: 30px 30px 20px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.rbq-quiz-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0 0 15px 0;
    color: #23282d;
    line-height: 1.2;
}

.rbq-quiz-description {
    font-size: 1.1rem;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

/* Barra de Progresso */
.rbq-progress-container {
    padding: 20px 30px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.rbq-progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.rbq-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0073aa, #00a0d2);
    width: 0%;
    transition: width 0.4s ease;
    border-radius: 4px;
}

.rbq-progress-text {
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

/* Perguntas */
.rbq-question {
    padding: 30px;
    display: none;
}

.rbq-question.active {
    display: block;
}

.rbq-question-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0 0 25px 0;
    color: #23282d;
    line-height: 1.4;
}

/* Opções de Resposta */
.rbq-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rbq-option {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
    position: relative;
}

.rbq-option:hover {
    border-color: #0073aa;
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 124, 170, 0.15);
}

.rbq-option.selected {
    border-color: #0073aa;
    background: #e3f2fd;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 124, 170, 0.2);
}

.rbq-option input[type="radio"],
.rbq-option input[type="checkbox"] {
    margin-right: 15px;
    transform: scale(1.2);
}

.rbq-option-text {
    flex: 1;
    font-size: 1rem;
    font-weight: 500;
    color: #333;
}

/* Opções de Texto */
.rbq-text-input,
.rbq-number-input,
.rbq-email-input,
.rbq-phone-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: #fff;
}

.rbq-text-input:focus,
.rbq-number-input:focus,
.rbq-email-input:focus,
.rbq-phone-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 124, 170, 0.1);
}

/* Navegação */
.rbq-question-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

.rbq-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.rbq-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.rbq-btn-prev {
    background: #6c757d;
    color: white;
}

.rbq-btn-prev:hover:not(:disabled) {
    background: #5a6268;
    transform: translateY(-2px);
}

.rbq-btn-next {
    background: #0073aa;
    color: white;
}

.rbq-btn-next:hover:not(:disabled) {
    background: #005a87;
    transform: translateY(-2px);
}

.rbq-btn-submit {
    background: #28a745;
    color: white;
}

.rbq-btn-submit:hover:not(:disabled) {
    background: #218838;
    transform: translateY(-2px);
}

/* Resultados */
.rbq-results {
    padding: 40px 30px;
    text-align: center;
    display: none;
}

.rbq-results.show {
    display: block;
}

.rbq-results-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 30px 0;
    color: #23282d;
}

.rbq-score-container {
    margin-bottom: 30px;
}

.rbq-score {
    font-size: 3rem;
    font-weight: 700;
    color: #0073aa;
    margin-bottom: 10px;
}

.rbq-score-label {
    font-size: 1.1rem;
    color: #666;
    font-weight: 500;
}

.rbq-results-message {
    font-size: 1.2rem;
    color: #333;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* Estilos por Tema */
.rbq-style-1 {
    /* Estilo padrão - já aplicado acima */
}

.rbq-style-2 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.rbq-style-2 .rbq-quiz-header {
    background: rgba(255, 255, 255, 0.1);
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.rbq-style-2 .rbq-quiz-title,
.rbq-style-2 .rbq-question-title {
    color: white;
}

.rbq-style-2 .rbq-quiz-description {
    color: rgba(255, 255, 255, 0.8);
}

.rbq-style-2 .rbq-progress-container {
    background: rgba(255, 255, 255, 0.1);
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.rbq-style-2 .rbq-progress-bar {
    background: rgba(255, 255, 255, 0.3);
}

.rbq-style-2 .rbq-progress-fill {
    background: linear-gradient(90deg, #fff, rgba(255, 255, 255, 0.8));
}

.rbq-style-2 .rbq-progress-text {
    color: rgba(255, 255, 255, 0.8);
}

.rbq-style-2 .rbq-option {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.3);
    color: #333;
}

.rbq-style-2 .rbq-option:hover {
    background: rgba(255, 255, 255, 1);
    border-color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.rbq-style-2 .rbq-option.selected {
    background: white;
    border-color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.rbq-style-2 .rbq-question-navigation {
    background: rgba(255, 255, 255, 0.1);
    border-top-color: rgba(255, 255, 255, 0.2);
}

.rbq-style-2 .rbq-btn-prev {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.rbq-style-2 .rbq-btn-prev:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.3);
}

.rbq-style-2 .rbq-btn-next,
.rbq-style-2 .rbq-btn-submit {
    background: white;
    color: #667eea;
}

.rbq-style-2 .rbq-btn-next:hover:not(:disabled),
.rbq-style-2 .rbq-btn-submit:hover:not(:disabled) {
    background: #f8f9fa;
}

/* Estados de Loading */
.rbq-loading {
    position: relative;
    pointer-events: none;
}

.rbq-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.rbq-loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: rbq-spin 1s linear infinite;
    z-index: 1001;
}

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

/* Animações */
.rbq-fade-in {
    animation: rbq-fade-in 0.5s ease;
}

@keyframes rbq-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rbq-slide-in {
    animation: rbq-slide-in 0.3s ease;
}

@keyframes rbq-slide-in {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

/* Responsivo */
@media (max-width: 768px) {
    .rbq-quiz-container {
        margin: 10px;
        padding: 15px;
    }
    
    .rbq-quiz-header {
        padding: 20px 20px 15px;
    }
    
    .rbq-quiz-title {
        font-size: 1.8rem;
    }
    
    .rbq-quiz-description {
        font-size: 1rem;
    }
    
    .rbq-progress-container {
        padding: 15px 20px;
    }
    
    .rbq-question {
        padding: 20px;
    }
    
    .rbq-question-title {
        font-size: 1.2rem;
        margin-bottom: 20px;
    }
    
    .rbq-option {
        padding: 12px 15px;
    }
    
    .rbq-question-navigation {
        padding: 15px 20px;
        flex-direction: column;
        gap: 10px;
    }
    
    .rbq-btn {
        width: 100%;
        min-width: auto;
    }
    
    .rbq-results {
        padding: 30px 20px;
    }
    
    .rbq-results-title {
        font-size: 1.5rem;
    }
    
    .rbq-score {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .rbq-quiz-container {
        margin: 5px;
        padding: 10px;
    }
    
    .rbq-quiz-header {
        padding: 15px 15px 10px;
    }
    
    .rbq-quiz-title {
        font-size: 1.5rem;
    }
    
    .rbq-progress-container {
        padding: 10px 15px;
    }
    
    .rbq-question {
        padding: 15px;
    }
    
    .rbq-question-title {
        font-size: 1.1rem;
    }
    
    .rbq-option {
        padding: 10px 12px;
    }
    
    .rbq-option-text {
        font-size: 0.9rem;
    }
    
    .rbq-question-navigation {
        padding: 10px 15px;
    }
    
    .rbq-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .rbq-results {
        padding: 20px 15px;
    }
    
    .rbq-results-title {
        font-size: 1.3rem;
    }
    
    .rbq-score {
        font-size: 2rem;
    }
}

/* Melhorias de Acessibilidade */
.rbq-quiz-container:focus-within {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.rbq-option:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.rbq-btn:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Suporte para modo escuro */
@media (prefers-color-scheme: dark) {
    .rbq-quiz-container {
        background: #1e1e1e;
        color: #fff;
    }
    
    .rbq-quiz-title,
    .rbq-question-title {
        color: #fff;
    }
    
    .rbq-quiz-description,
    .rbq-progress-text {
        color: #ccc;
    }
    
    .rbq-option {
        background: #2d2d2d;
        border-color: #444;
        color: #fff;
    }
    
    .rbq-option:hover {
        background: #3d3d3d;
        border-color: #0073aa;
    }
    
    .rbq-option.selected {
        background: #0073aa;
        border-color: #0073aa;
        color: #fff;
    }
    
    .rbq-text-input,
    .rbq-number-input,
    .rbq-email-input,
    .rbq-phone-input {
        background: #2d2d2d;
        border-color: #444;
        color: #fff;
    }
    
    .rbq-text-input:focus,
    .rbq-number-input:focus,
    .rbq-email-input:focus,
    .rbq-phone-input:focus {
        border-color: #0073aa;
    }
    
    .rbq-progress-container,
    .rbq-question-navigation {
        background: #2d2d2d;
        border-color: #444;
    }
    
    .rbq-progress-bar {
        background: #444;
    }
}

/* Utilitários */
.rbq-hidden {
    display: none !important;
}

.rbq-visible {
    display: block !important;
}

.rbq-text-center {
    text-align: center;
}

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

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

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

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

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