/**
 * ACA Personality Tests CSS
 * Brand Colors: Green #88b441, Dark Blue #1a243b, Orange #b1632f
 */

/* ─── Button (Hub Integration) ─── */
.aca-persoenlichkeit-button {
    display: block;
    width: 100%;
    padding: 14px 20px;
    background: #b1632f;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    text-align: center;
}

/* When inside interview-widgets grid, reset width */
.aca-interview-widgets .aca-persoenlichkeit-button {
    width: auto;
}

.aca-persoenlichkeit-button:hover {
    background: #9a5528;
    transform: translateY(-1px);
}

/* ─── Modal Overlay ─── */
.aca-pers-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.aca-pers-modal {
    background: white;
    border-radius: 12px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.aca-pers-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.aca-pers-modal__close:hover {
    background: #f0f0f0;
    color: #333;
}

.aca-pers-modal__title {
    font-size: 22px;
    font-weight: 700;
    color: #1a243b;
    margin: 0 0 20px 0;
}

/* ─── Intro & Warning Boxes ─── */
.aca-pers-intro {
    margin-bottom: 20px;
}

.aca-pers-intro h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1a243b;
    margin: 0 0 8px 0;
}

.aca-pers-intro p {
    font-size: 15px;
    line-height: 1.6;
    color: #444;
    margin: 0;
}

.aca-pers-warning {
    background: #fff8f0;
    border: 1px solid #f0d0a0;
    border-radius: 8px;
    padding: 16px 20px;
    margin: 20px 0;
}

.aca-pers-warning p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #7a5a30;
}

/* ─── Test Cards (Selection Screen) ─── */
.aca-pers-test-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 16px 0;
}

.aca-pers-test-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: border-color 0.2s;
}

.aca-pers-test-card:hover {
    border-color: #88b441;
}

.aca-pers-test-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.aca-pers-test-card__header h4 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #1a243b;
}

.aca-pers-test-card__meta {
    font-size: 13px;
    color: #888;
    margin-bottom: 8px;
}

.aca-pers-test-card__beschreibung {
    font-size: 14px;
    line-height: 1.5;
    color: #555;
    margin: 0 0 12px 0;
}

.aca-pers-test-start {
    background: #88b441;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
}

.aca-pers-test-start:hover {
    background: #769e38;
}

.aca-pers-test-start--disabled {
    background: #ccc;
    color: #888;
    cursor: not-allowed;
}

.aca-pers-test-start--disabled:hover {
    background: #ccc;
}

/* ─── Settings Screen ─── */
.aca-pers-settings {
    margin: 20px 0;
}

.aca-pers-settings h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1a243b;
    margin: 0 0 12px 0;
}

.aca-pers-settings-meta {
    font-size: 14px;
    color: #888;
    margin: -12px 0 20px 0;
}

.aca-pers-radio-option {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin: 8px 0;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.aca-pers-radio-option:hover {
    border-color: #88b441;
    background: #f9fdf5;
}

.aca-pers-radio-option input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border: 2px solid #ccc;
    border-radius: 50%;
    margin-right: 12px;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
}

.aca-pers-radio-option input[type="radio"]:checked {
    border-color: #88b441;
    background: #88b441;
    box-shadow: inset 0 0 0 4px white;
}

.aca-pers-radio-option span {
    font-size: 15px;
    color: #333;
}

.aca-pers-settings-hint {
    font-size: 13px;
    color: #888;
    margin-top: 12px;
}

/* ─── Test Screen ─── */
.aca-pers-test-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-right: 40px;
}

.aca-pers-test-name {
    font-size: 16px;
    font-weight: 700;
    color: #1a243b;
}

.aca-pers-test-counter {
    font-size: 14px;
    color: #888;
}

/* Progress Bar */
.aca-pers-progress {
    width: 100%;
    height: 6px;
    background: #e8e8e8;
    border-radius: 3px;
    margin-bottom: 20px;
    overflow: hidden;
}

.aca-pers-progress__bar {
    height: 100%;
    background: #88b441;
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

/* Timer */
.aca-pers-timer {
    font-size: 24px;
    font-weight: 700;
    color: #1a243b;
    text-align: center;
    margin: 12px 0;
}

.aca-pers-timer.warning {
    color: #b1632f;
    animation: aca-pers-pulse 0.5s infinite;
}

@keyframes aca-pers-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Question */
.aca-pers-question {
    margin: 24px 0;
    text-align: center;
}

.aca-pers-question__label {
    font-size: 13px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 8px 0;
}

.aca-pers-question__text {
    font-size: 20px;
    font-weight: 500;
    color: #1a243b;
    line-height: 1.5;
    margin: 0;
}

/* Options (Desktop: Vertical) */
.aca-pers-options {
    margin: 24px 0;
}

.aca-pers-option {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    margin: 8px 0;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.aca-pers-option:hover {
    border-color: #88b441;
    background: #f9fdf5;
}

.aca-pers-option.selected {
    border-color: #88b441;
    background: #f4f9ed;
}

.aca-pers-option input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border: 2px solid #ccc;
    border-radius: 50%;
    margin-right: 14px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
}

.aca-pers-option input[type="radio"]:checked {
    border-color: #88b441;
    background: #88b441;
    box-shadow: inset 0 0 0 4px white;
}

.aca-pers-option label {
    font-size: 15px;
    color: #333;
    cursor: pointer;
    flex: 1;
}

.aca-pers-option.selected label {
    color: #1a243b;
    font-weight: 600;
}

/* ─── Footer / Buttons ─── */
.aca-pers-modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.aca-pers-modal__footer--test {
    justify-content: space-between;
}

.aca-pers-btn--primary {
    background: #88b441;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.aca-pers-btn--primary:hover {
    background: #769e38;
}

.aca-pers-btn--primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.aca-pers-btn--secondary {
    background: #f0f0f0;
    color: #555;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s;
}

.aca-pers-btn--secondary:hover {
    background: #e0e0e0;
}

/* ─── Hub Integration: Test-Karten im Block ─── */
.aca-pers-hub-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin: 12px 0;
}

.aca-pers-hub-card__header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.aca-pers-hub-card__checkbox {
    flex-shrink: 0;
}

.aca-pers-hub-card h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #1a243b;
}

.aca-pers-hub-card__meta {
    font-size: 13px;
    color: #888;
    margin: 8px 0 0 36px;
}

.aca-pers-hub-card__beschreibung {
    font-size: 14px;
    color: #555;
    margin: 8px 0 12px 36px;
    line-height: 1.5;
}

.aca-pers-hub-card .aca-pers-test-start {
    margin-left: 36px;
}

/* ─── Mobile ─── */
@media (max-width: 768px) {
    .aca-pers-modal {
        padding: 20px;
        max-height: 95vh;
        margin: 10px;
        border-radius: 8px;
    }
    
    .aca-pers-modal__title {
        font-size: 18px;
        padding-right: 30px;
    }
    
    .aca-pers-question__text {
        font-size: 17px;
    }
    
    /* Mobile: Horizontal scale */
    .aca-pers-options--horizontal {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 16px 0;
    }
    
    .aca-pers-options--horizontal .aca-pers-option {
        flex-direction: column;
        padding: 8px;
        margin: 0;
        border: none;
        background: none;
        min-width: 44px;
    }
    
    .aca-pers-options--horizontal .aca-pers-option:hover {
        background: none;
        border: none;
    }
    
    .aca-pers-options--horizontal .aca-pers-option.selected {
        background: none;
        border: none;
    }
    
    .aca-pers-options--horizontal .aca-pers-option input[type="radio"] {
        margin: 0 0 4px 0;
    }
    
    .aca-pers-options--horizontal .aca-pers-option label {
        font-size: 12px;
        text-align: center;
    }
    
    .aca-pers-skala-labels {
        display: flex;
        justify-content: space-between;
        font-size: 11px;
        color: #888;
        margin-top: 4px;
    }
    
    .aca-pers-modal__footer {
        flex-wrap: wrap;
    }
    
    .aca-pers-modal__footer--test {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .aca-pers-timer {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .aca-pers-modal-overlay {
        padding: 0;
    }
    
    .aca-pers-modal {
        border-radius: 0;
        max-height: 100vh;
        height: 100vh;
        margin: 0;
    }
    
    .aca-pers-test-card {
        padding: 14px;
    }
    
    .aca-pers-option {
        padding: 12px 14px;
    }
}
