/* /var/www/html/questbase_clone/assets/css/styles.css */

#listaMaterie .badge {
    font-weight: 500;
    background-color: #0d6efd;
    color: #fff;
    border-radius: 1rem;
}

#listaMaterie .badge button {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: none;
    font-size: 0.8rem;
}

#listaMaterie .badge button:hover {
    background: rgba(255, 255, 255, 0.4);
    color: #000;
}

/* ============================================================
   DOMANDE & ARGOMENTI – INTERFACCIA DRAG & DROP
============================================================ */

/* --- Contenitori principali ---- */
#arg-left-pane,
#arg-right-pane {
    background: #fff;
    border: 1px solid #dcdcdc;
    border-radius: 6px;
    padding: 12px;
    height: 78vh;
    overflow-y: auto;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.05);
}

/* Titoli */
.arg-section-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

/* ============================================================
   ARGOMENTI (TREE VIEW)
============================================================ */

.argomento-node {
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 2px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
}

.argomento-node:hover {
    background: #f5f5f5;
}

.argomento-node.selected {
    background: #d9ecff;
    border-left: 3px solid #007bff;
}

.arg-indent-1 {
    margin-left: 15px;
}

.arg-indent-2 {
    margin-left: 30px;
}

.arg-indent-3 {
    margin-left: 45px;
}

.arg-indent-4 {
    margin-left: 60px;
}

/* Icona tree */
.arg-arrow {
    margin-right: 6px;
}

/* ============================================================
   CARDS DOMANDE
============================================================ */

.domanda-card {
    background: #fafafa;
    border: 1px solid #e4e4e4;
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 8px;
    cursor: grab;
    position: relative;
    transition: box-shadow 0.2s, background 0.2s;
}

.domanda-card:active {
    cursor: grabbing;
}

.domanda-card:hover {
    background: #f2f2f2;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* ghost card mentre trascini */
.domanda-ghost {
    opacity: 0.4;
}

/* testo */
.domanda-testo {
    font-size: 0.95rem;
    color: #333;
    line-height: 1.3rem;
}

/* badge piccolini (per livello difficoltà, ID, etc) */
.domanda-badges {
    margin-top: 6px;
}

.domanda-badge {
    background: #e9eef7;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    color: #2c5ea8;
    display: inline-block;
    margin-right: 4px;
}

/* ============================================================
   DROP ZONES
============================================================ */

.dropzone {
    min-height: 100px;
    padding: 8px;
    border: 2px dashed #b5b5b5;
    border-radius: 6px;
    transition: border-color 0.2s, background 0.2s;
}

.dropzone.drag-over {
    border-color: #2f7ffc;
    background: #eaf3ff;
}

.dropzone-empty-message {
    text-align: center;
    color: #777;
    font-size: 0.9rem;
    padding: 20px 0;
}

/* ============================================================
   SELETTORE TRIPLETTA (Classe–Materia–Blocco)
============================================================ */

#context-bar {
    padding: 12px;
    background: #f8f9fb;
    border: 1px solid #dedede;
    border-radius: 6px;
    margin-bottom: 15px;
}

#context-bar label {
    font-weight: 600;
    margin-bottom: 4px;
    display: block;
}

/* rendiamo responsive */
@media (max-width: 991px) {

    #arg-left-pane,
    #arg-right-pane {
        height: auto;
        max-height: none;
    }

    .domanda-card {
        font-size: 1rem;
    }
}


/* ============================================================
   ARGOMENTI – STILE SELEZIONE + SPUNTA
============================================================ */

.arg-item {
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    transition: background 0.15s, color 0.15s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.arg-item:hover {
    background: #f0f7ff;
}

.arg-item.selected {
    background: #d9ecff;
    font-weight: 700;
    color: #0a58ca;
}

.arg-checkmark {
    width: 18px;
    text-align: center;
    font-size: 16px;
    color: #198754;
    font-weight: bold;
    visibility: hidden;
}

.arg-item.selected .arg-checkmark {
    visibility: visible;
}

/* ============================================================ 
   PREMIUM UI ENHANCEMENTS 
/* ============================================================
   PREMIUM UI ENHANCEMENTS
============================================================ */

/* Global Font */
body {
    font-family: 'Inter', sans-serif;
    color: #333;
}

/* Navbar Custom Gradient */
.navbar-custom {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    /* Deep Blue Gradient */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Navbar Links Hover Effect */
.navbar-custom .nav-link {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.navbar-custom .nav-link:hover,
.navbar-custom .nav-link:focus,
.navbar-custom .show>.nav-link {
    background-color: rgba(255, 255, 255, 0.15);
    color: #fff !important;
    transform: translateY(-1px);
}

/* Navbar Brand & Role Badge */
.brand-text {
    letter-spacing: -0.5px;
    font-weight: 700;
}

.role-badge {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    color: #1e3c72 !important;
    /* Matches gradient start */
}

/* Dropdown Animation */
@keyframes slideInFade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-in {
    animation: slideInFade 0.25s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    margin-top: 10px;
    border-radius: 8px;

    /* High Contrast Styling */
    background-color: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-top: 4px solid #2a5298 !important;
    /* Theme Blue Accent */
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2) !important;
    /* Deep shadow for pop-out effect */
}

/* Dropdown Item Hover */
.dropdown-item {
    padding: 8px 16px;
    transition: background-color 0.2s ease, color 0.2s ease;
    border-radius: 8px;
    /* Slightly rounded inside */
    margin: 2px 4px;
    /* Spacing for the rounded effect */
    width: auto;
    /* Fit to container with margin */
}

.dropdown-item:hover {
    background-color: #f0f4f8;
    color: #1e3c72;
}


/* ============================================================
   QUIZ EXECUTION (Student Side)
============================================================ */

/* Tablet-optimized Answer Cards */
.answer-card {
    border: 2px solid #cbd5e1; /* Scurito per maggiore visibilità */
    border-radius: 10px;
    padding: 0.6rem 0.8rem; /* Ridotto per tablet */
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
    position: relative;
    min-height: 50px;
}

.answer-card:hover {
    border-color: #6366f1;
    background-color: #f8faff;
}

.answer-card.selected {
    border-color: #4f46e5;
    background-color: #eef2ff;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.15);
}

/* Visibility for Radio Buttons (Accessibility/DSA) */
.answer-card .form-check-input {
    width: 1.4rem;
    height: 1.4rem;
    margin-top: 0;
    margin-right: 1rem;
    border: 2px solid #555 !important; /* Molto visibile */
    cursor: pointer;
    flex-shrink: 0;
}

.answer-card .form-check-input:checked {
    background-color: #4f46e5;
    border-color: #4f46e5 !important;
}

.answer-text {
    font-size: 0.95rem; /* Ottimizzato tablet */
    line-height: 1.3;
    color: #1e293b;
    font-weight: 500;
}

/* Compact Textarea for Open Questions */
textarea.form-control {
    font-size: 1rem;
    border: 2px solid #cbd5e1;
    border-radius: 10px;
    padding: 0.75rem;
}

textarea.form-control:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

/* ============================================================
   NAVBAR & UI ENHANCEMENTS
   ============================================================ */
.navbar-custom .nav-link {
    transition: all 0.2s ease;
    font-weight: 500;
}
.navbar-custom .nav-link:hover {
    background: rgba(255,255,255,0.1);
}

/* Quick Action Button - Premium Look */
.btn-accent {
    background-color: #ffffff !important;
    color: var(--brand-primary) !important;
    font-weight: 600 !important;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
    background-color: #f8fafc !important;
}

.btn-accent:active {
    transform: translateY(0);
}

/* Dropdown Menu Enhancements */
.dropdown-menu {
    border-radius: 12px;
    padding: 0.75rem;
}
.dropdown-header {
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.05rem;
    font-weight: 700;
    color: #94a3b8;
    margin-top: 0.5rem;
}
.dropdown-item {
    border-radius: 8px;
    padding: 0.6rem 1rem;
    font-weight: 500;
    color: #334155;
    transition: all 0.2s;
}
.dropdown-item:hover {
    background-color: #f1f5f9;
    color: var(--brand-primary);
}

/* ============================================================
   AURA-DASHBOARD 2.0 STYLES
   ============================================================ */

/* Soft Backgrounds for KPI Icons */
.bg-success-soft { background-color: rgba(16, 185, 129, 0.1) !important; }
.bg-warning-soft { background-color: rgba(245, 158, 11, 0.1) !important; }
.bg-primary-soft { background-color: rgba(79, 70, 229, 0.1) !important; }

.kpi-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
}

.card-kpi {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-kpi:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08) !important;
}

/* Pulse Animation for Attention */
.pulse-badge {
    animation: pulse-animation 2s infinite;
    font-size: 0.7rem;
    padding: 0.4em 0.8em;
}

@keyframes pulse-animation {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(220, 38, 38, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

/* Action Cards */
.card-action {
    border: 1px solid #f1f5f9 !important;
    transition: all 0.2s ease;
}

.card-action:hover {
    border-color: var(--brand-primary) !important;
    background-color: #fcfdfe;
}

.text-accent {
    color: var(--brand-primary);
}
