/* =============================================
   Inkryptus Diagnostic Form - Frontend Styles
   ============================================= */

/* Container & Theme Integration */
.inky-diagnostic-container {
    max-width: 700px;
    margin: 40px auto;
    padding: 40px;
    border-radius: 12px;
    font-family: inherit;
    position: relative;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;

    /* Default - Transitions */
    transition: background-color 0.3s, color 0.3s, box-shadow 0.3s;

    /* Background and Shadow from Theme variables */
    background-color: var(--surface-2, #ffffff);
    color: var(--text-light, #333333);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border: solid var(--primary);
}

/* Light Theme Support */
body.light-theme .inky-diagnostic-container {
    background-color: var(--light-surface-2, #ffffff);
    color: var(--dark-text, #333333);
    box-shadow: var(--shadow-light-md, 0 5px 20px rgba(0, 0, 0, 0.05));
}

/* Steps */
.inky-step {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
}

.inky-step.active {
    display: block;
}

/* Typography & Alignment */
.inky-diagnostic-container h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--primary);
    text-align: left;
    /* Alinhamento à esquerda pedido */
}

.inky-diagnostic-container h3.inky-question-counter {
    font-size: 14px;
    text-transform: uppercase;
    color: var(--text-secondary, #888);
    margin-bottom: 10px;
    text-align: left;
    /* Alinhamento à esquerda pedido */
}

body.light-theme .inky-diagnostic-container h3.inky-question-counter {
    color: var(--dark-text-secondary, #666);
}

.inky-question-text {
    font-size: 18px;
    margin-bottom: 30px;
    text-align: left;
    /* Alinhamento à esquerda pedido */
    background: var(--dark-text-secondary);
    padding: 3%;
    border-radius: 10px;
    color: var(--text-light);
}

body.light-theme .inky-question-text {
    background: var(--light-surface-3);
    color: var(--dark-text);
}

/* Content */
.inky-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
    text-align: left;
    /* Alinhamento à esquerda pedido */
    color: var(--text-secondary, #555);
}

body.light-theme .inky-content {
    color: var(--dark-text-secondary, #555);
}

/* Actions */
.inky-actions {
    text-align: left;
    /* Botão alinhado à esquerda acompanha textos */
    margin-top: 20px;
}

button.inky-btn-next,
button.inky-btn-submit {
    background: var(--primary, #0073aa);
    /* Cor Primária */
    color: #fff;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: opacity 0.3s, transform 0.2s;
    font-weight: 600;
}

button.inky-btn-next:hover,
button.inky-btn-submit:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Likert Options */
.inky-likert-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    /* Aumentado espaçamento entre box alternativas */
    max-width: 100%;
    margin: 0 0 30px;
}

.inky-likert-option {
    display: flex;
    align-items: center;
    padding: 18px;
    border: 1px solid var(--surface-3, #ddd);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
}

body.light-theme .inky-likert-option {
    border-color: var(--light-surface-3, #eee);
}

.inky-likert-option:hover {
    background: rgba(var(--primary-rgb, 0, 115, 170), 0.05);
    border-color: var(--primary, #0073aa);
}

.inky-likert-option input {
    margin-right: 15px;
    transform: scale(1.2);
    accent-color: var(--primary, #0073aa);
    /* Garante a cor primária na "bolinha" */
}

.inky-likert-label {
    font-size: 16px;
    color: gray;
}

.inky-likert-option input:checked+.inky-likert-label {
    font-weight: bold;
}

.inky-likert-option:has(input:checked) {
    border-color: var(--primary, #0073aa);
    background: rgba(var(--primary-rgb, 0, 115, 170), 0.1);
}

/* Form Inputs */
.inky-form-group {
    margin-bottom: 15px;
    text-align: left;
    max-width: 100%;
}

.inky-option-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.inky-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: inherit;
}

.inky-form-group input {
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--surface-3, #ddd);
    color: inherit;
    transition: border-color 0.3s;
}

body.light-theme .inky-form-group input {
    background-color: #fff;
    border-color: var(--light-surface-3, #eee);
}

.inky-form-group input:focus {
    border-color: var(--primary, #0073aa);
    outline: none;
}

/* Footer Links */
.inky-footer-links {
    margin-top: 30px;
    text-align: left;
    /* Alinhamento à esquerda */
    font-size: 13px;
    opacity: 0.7;
}

.inky-footer-links a {
    color: var(--primary, #0073aa);
    text-decoration: none;
}

.inky-footer-links a:hover {
    text-decoration: underline;
}

/* Result Screen Refinement */
.inky-result-summary {
    background: rgba(var(--primary-rgb, 0, 115, 170), 0.1);
    border-left: 4px solid var(--primary);
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 0 8px 8px 0;
}

.inky-theme-results-title {
    font-size: 18px;
    margin: 30px 0 15px;
    font-weight: 600;
}

.inky-theme-accordion {
    border: 1px solid var(--surface-3, #ddd);
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
}

body.light-theme .inky-theme-accordion {
    border-color: var(--light-surface-3, #eee);
}

.inky-accordion-header {
    background: var(--surface-2, #f9f9f9);
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    transition: background 0.3s;
    color: var(--text-secondary, #555);
}

body.light-theme .inky-accordion-header {
    background: var(--light-surface-2, #f9f9f9);
}

.inky-accordion-header:hover {
    background: var(--surface-3, #f0f0f0);
}

.theme-score-pill {
    background: var(--primary);
    color: #855700;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    display: inline-block;
    white-space: nowrap;
}

.inky-accordion-content {
    padding: 20px;
    display: none;
    border-top: 1px solid var(--surface-3, #ddd);
    line-height: 1.6;
    color: var(--text)
}

body.light-theme .inky-accordion-content {
    border-top-color: var(--light-surface-3, #eee);
}

.inky-theme-accordion.active .inky-accordion-content {
    display: block;
}

/* History Accordion & Table */
.inky-history-accordion {
    margin-top: 20px;
}

.inky-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    color: var(--text-secondary, #555);
}

body.light-theme .inky-history-table {
    color: var(--dark-text-secondary, #555);
}

.inky-history-table th,
.inky-history-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid var(--surface-3, #ddd);
}

body.light-theme .inky-history-table th,
body.light-theme .inky-history-table td {
    border-bottom-color: var(--light-surface-3, #eee);
}

.inky-history-table th {
    font-weight: 600;
    color: var(--primary);
}

.inky-history-q-text {
    font-weight: 500;
    margin-bottom: 5px;
    color: var(--text-light);
}

body.light-theme .inky-history-q-text {
    color: var(--dark-text);
}

.inky-history-theme-tag {
    display: inline-block;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(var(--primary-rgb, 0, 115, 170), 0.1);
    color: rgba(var(--primary-rgb), 0.5);
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.inky-history-table tr:last-child td {
    border-bottom: none;
}

.inky-accordion-header i.dashicons {
    transition: transform 0.3s;
    font-size: 18px;
}

.inky-theme-accordion.active .inky-accordion-header i.dashicons {
    transform: rotate(180deg);
}

.inky-result-summary-message {
    margin-top: 10px;
    font-size: 14px;
    color: var(--text-secondary, #555);
}

body.light-theme .inky-result-summary-message {
    color: var(--dark-text-secondary, #555);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}