/* Custom styles for the Anonymous Questionnaire project.
   Supplements Pico CSS with project-specific styling. */

/* --- Messages --- */
.messages-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
    max-width: 400px;
}
.message {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    animation: fadeIn 0.3s ease-in;
}
.message-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.message-error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.message-warning { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.message-info { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* --- Status Badges --- */
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.badge-green { background: #d1fae5; color: #065f46; }
.badge-yellow { background: #fef3c7; color: #92400e; }
.badge-gray { background: #f3f4f6; color: #4b5563; }
.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-red { background: #fee2e2; color: #991b1b; }

/* --- Student Layout --- */
.student-header {
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
    padding: 1.5rem 0;
    border-bottom: 1px solid #e5e7eb;
    text-align: center;
}
.student-header h1 { margin: 0; font-size: 1.5rem; color: #1e40af; }
.student-main { max-width: 640px; padding: 2rem 1rem; }
.student-footer {
    text-align: center;
    padding: 2rem 0;
    color: #6b7280;
    border-top: 1px solid #e5e7eb;
}

/* --- Admin Layout --- */
.admin-nav {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 0.5rem 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
}
.admin-nav a.active {
    background: #dbeafe;
    border-radius: 0.375rem;
    color: #1e40af;
}
.admin-main { padding: 1.5rem 0; }
.btn-sm { padding: 0.3rem 0.8rem !important; font-size: 0.85rem !important; }

/* --- Stats Cards Grid --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
}
.stat-card .stat-value { font-size: 2rem; font-weight: 700; color: #1e40af; }
.stat-card .stat-label { font-size: 0.85rem; color: #6b7280; }

/* --- Progress Bar --- */
.progress-bar-container {
    background: #e5e7eb;
    border-radius: 999px;
    height: 0.5rem;
    overflow: hidden;
    margin: 0.5rem 0;
}
.progress-bar-fill {
    background: #2563eb;
    height: 100%;
    border-radius: 999px;
    transition: width 0.3s ease;
}

/* --- Rating Buttons (radio-based, no JS) --- */
.rating-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}
.rating-group label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 2px solid #d1d5db;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.15s;
}
.rating-group input[type="radio"] { display: none; }
.rating-group input[type="radio"]:checked + span {
    /* This won't work without JS — using a different approach */
}
.rating-group label:has(input:checked) {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}
.rating-group label:hover {
    border-color: #60a5fa;
    background: #eff6ff;
}
.rating-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.25rem;
}

/* --- Survey Builder --- */
.page-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.5rem;
}
.page-tab {
    padding: 0.5rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.9rem;
    background: #f9fafb;
}
.page-tab.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}
.question-card {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    background: #fff;
}
.question-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

/* --- Domain Pills --- */
.domain-pill {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: #dbeafe;
    color: #1e40af;
    border-radius: 999px;
    font-size: 0.8rem;
    margin: 0.2rem;
}

/* --- Raffle Ticket Number Display --- */
.raffle-ticket-number {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    color: #1e40af;
    font-family: monospace;
}

/* --- Privacy Notice --- */
.privacy-notice {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 0.5rem;
    padding: 1rem;
    font-size: 0.9rem;
    color: #1e40af;
}

/* --- Pagination --- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
}
