/* Progress Animation Styling */
#progress-container {
    display: none;
    margin-top: 2rem;
}

.progress-stage {
    color: var(--accent);
    opacity: 0.3;
    transition: 0.5s;
    font-size: 0.9rem;
}

.active-stage {
    opacity: 1;
    font-weight: bold;
    transform: scale(1.1);
}

.spinner-border-sm {
    display: none;
    margin-right: 8px;
}

.loading .spinner-border-sm {
    display: inline-block;
}

.loading .btn-text {
    display: none;
}

.error-msg {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 1rem;
    border-radius: 12px;
    margin-top: 1rem;
    text-align: center;
}

#questionsForm input {
    border-color: var(--border);
    background-color: var(--bg);
    color: var(--text);
}

#progress-container {
    display: none;
    margin: 2rem 0;
}

.progress-stage {
    color: var(--accent);
    opacity: 0.3;
    transition: 0.5s;
    font-size: 0.95rem;
    text-align: center;
}

.active-stage {
    opacity: 1;
    font-weight: 500;
    transform: scale(1.05);
}

/* Results Dashboard Styling */
.tab-content {
    padding: 2rem;
    border-radius: 0 0 20px 20px;
    border-top: none;
}

.ai-content-wrapper {
    line-height: 1.6;
}

.ai-content-wrapper h3 {
    font-size: 1.25rem;
    color: var(--accent);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

/* Ensuring Weekly sequential parts are readable */
.weekly-section-part {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px dashed var(--border);
}

.weekly-section-part:last-child {
    border-bottom: none;
}


/* Table Responsiveness
.table-responsive table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.table-responsive th {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent);
    padding: 15px;
    border-radius: 10px 10px 0 0;
}

.table-responsive td {
    background: rgba(255, 255, 255, 0.02);
    padding: 15px;
    border-top: 1px solid var(--border);
}

/* Timeline Roadmap Modular UI */
#section-roadmap ul {
    list-style: none;
    padding-left: 0;
}

#section-roadmap li {
    padding: 15px;
    margin-bottom: 10px;
    background: rgba(59, 130, 246, 0.05);
    border-left: 4px solid var(--accent);
    border-radius: 0 10px 10px 0;
}

/* Modular Section Styling */
.plan-section-card {
    background: var(--card);
    /* Uses theme-specific variable */
    border: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    transition: transform 0.3s ease;
}

.plan-section-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: var(--accent);
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    padding-bottom: 8px;
}

.section-header h4 {
    border-left: 4px solid var(--accent);
    padding-left: 12px;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

/* Specific styling for the table to look like a prescription */
.prescription-table {
    border-radius: 10px;
    overflow: hidden;
}

.prescription-table th {
    background: rgba(59, 130, 246, 0.2) !important;
    text-transform: uppercase;
    font-size: 0.8rem;
}

/* error-animation */
.error-popup {
    /* Fixed Positioning & Centering */
    position: fixed;
    top: 50%;
    left: 50%;
    /* Keep the translate constant to avoid the jump */
    transform: translate(-50%, -50%);

    z-index: 9999;
    width: 340px;
    max-width: 90vw;

    /* Animation settings */
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    transform-origin: center;
}

@keyframes popIn {
    0% {
        /* Match the translate exactly here */
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }

    100% {
        /* Match the translate exactly here */
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translate(-50%, -50%) translateX(0);
    }

    25% {
        transform: translate(-50%, -50%) translateX(-10px);
    }

    75% {
        transform: translate(-50%, -50%) translateX(10px);
    }
}

/* Agent Showcase Styling */
.agent-card {
    height: 100%;
    transition: transform 0.3s ease, border-color 0.3s ease;
    border: 1px solid var(--border);
}

.agent-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
}

.agent-icon {
    font-size: 2.5rem;
    background: rgba(59, 130, 246, 0.1);
    width: 70px;
    height: 70px;
    line-height: 70px;
    border-radius: 50%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

.glass {
    transition: background 0.3s ease, border-color 0.3s ease;
}

.form-check-input:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}

.top-bar-unified.glass {
    background: var(--bg);
    /* Adjust based on dark/light needs */
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.container.py-5 {
    padding-top: 80px !important;
}