/* ==========================================================
   MinPanda Food — Unified Stylesheet
   All page styles consolidated here.
   ========================================================== */


/* =========================
   1. BASE / RESET
   ========================= */

body {
    background-color: #f8f9fa;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1a1a1a;
}


/* =========================
   2. NAVIGATION BAR
   ========================= */

.minpanda-header {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    background-color: #ffffff;
    padding: 12px 5px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.minpanda-header a {
    text-decoration: none;
    color: #a0a0a0;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 14px;
    border-radius: 14px;
    transition: all 0.2s ease;
}

.minpanda-header a::first-letter {
    font-size: 1.4rem;
    margin-bottom: 2px;
}

.minpanda-header a:hover,
.minpanda-header a:active {
    color: #1a1a1a;
    background-color: #ffcf24;
    box-shadow: 0 4px 12px rgba(255, 207, 36, 0.3);
    transform: translateY(-2px);
}

.minpanda-divider {
    border: none;
    height: 1px;
    background-color: #f0f0f0;
    margin: 0 0 20px 0;
}


/* =========================
   3. PAGE LAYOUT (shared wrapper)
   ========================= */

.page-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px 16px;
}


/* =========================
   4. HOME PAGE
   ========================= */

.app-content {
    max-width: 480px; /* Mobile-first width for home hero */
    margin: 0 auto;
    padding: 24px 16px;
}

/* Welcome Banner */
.welcome-banner {
    margin-bottom: 30px;
}

.welcome-banner .greeting {
    color: #757575;
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 4px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.welcome-banner h1 {
    margin: 0 0 8px 0;
    font-size: 1.8rem;
    color: #1a1a1a;
    font-weight: 800;
}

.welcome-banner .subtitle {
    margin: 0;
    color: #555;
    font-size: 1rem;
}

/* Action Cards Grid */
.action-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.action-card {
    display: flex;
    align-items: center;
    background-color: #ffffff;
    padding: 20px;
    border-radius: 16px;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 2px solid transparent;
    transition: all 0.25s ease;
}

@media (hover: hover) {
    .action-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    }
}
.action-card:active {
    transform: translateY(1px);
}

.primary-card {
    background-color: #fffbdf;
    border-color: #ffcf24;
}

.home-admin-card {
    margin-top: 10px;
    background-color: #f0f0f0;
    opacity: 0.9;
}

.card-icon {
    font-size: 2rem;
    margin-right: 16px;
    background: #ffffff;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.primary-card .card-icon {
    background: #ffcf24;
}

.card-details {
    flex-grow: 1;
}

.card-details h3 {
    margin: 0 0 4px 0;
    font-size: 1.1rem;
    color: #1a1a1a;
}

.card-details p {
    margin: 0;
    font-size: 0.85rem;
    color: #757575;
}

.card-arrow {
    color: #d4d4d4;
    font-size: 1.2rem;
}

.action-card:hover .card-arrow {
    color: #ffcf24;
}


/* =========================
   5. LOGIN PAGE
   ========================= */

.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    margin-top: 20px;
}

.login-card {
    background: #ffffff;
    width: 100%;
    max-width: 380px;
    border-radius: 20px;
    padding: 32px 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
    text-align: center;
    border-top: 6px solid #ffcf24;
}

.login-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.login-card h1 {
    margin: 0 0 8px 0;
    font-size: 1.6rem;
    color: #1a1a1a;
    font-weight: 800;
}

.login-card p {
    margin: 0 0 24px 0;
    font-size: 0.9rem;
    color: #757575;
}

/* Login Input */
.input-group {
    margin-bottom: 24px;
}

.input-group input {
    width: 100%;
    padding: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    box-sizing: border-box;
    transition: all 0.3s ease;
    background-color: #fcfcfc;
    text-align: center;
    letter-spacing: 2px;
}

.input-group input:focus {
    outline: none;
    border-color: #ffcf24;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(255, 207, 36, 0.15);
}

/* Login Button */
.login-btn {
    width: 100%;
    padding: 16px;
    background-color: #ffcf24;
    color: #1a1a1a;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(255, 207, 36, 0.3);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(255, 207, 36, 0.4);
    background-color: #ffc910;
}

.login-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(255, 207, 36, 0.3);
}


/* =========================
   6. CUSTOMER / ORDER PAGE
   ========================= */

.page-content h3 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: #2c2c2c;
}

.food-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
}

.food-card {
    background-color: #ffffff;
    border: 2px solid transparent;
    border-radius: 16px;
    padding: 12px;
    cursor: pointer;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
    transition: all 0.25s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.food-card:hover {
    transform: translateY(-4px);
}

.food-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 12px;
    background-color: #f0f0f0;
}

.food-card p {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
}

.check-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #ffcf24;
    color: #1a1a1a;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s ease;
}

.food-card.selected {
    border-color: #ffcf24;
    background-color: #fffbdf;
    box-shadow: 0 8px 20px rgba(255, 207, 36, 0.25);
}

.food-card.selected .check-badge {
    opacity: 1;
    transform: scale(1);
}

.selection-panel {
    margin-top: 25px;
    padding: 16px;
    background: white;
    border-radius: 14px;
    border-left: 4px solid #ffcf24;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.selection-panel p {
    margin: 0;
}

#selectedFood {
    font-weight: bold;
}

/* Customer form inputs */
.page-content input,
.page-content textarea {
    width: 100%;
    padding: 12px;
    box-sizing: border-box;
    margin-top: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    background-color: #fcfcfc;
    transition: all 0.3s ease;
}

.page-content input:focus,
.page-content textarea:focus {
    outline: none;
    border-color: #ffcf24;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(255, 207, 36, 0.15);
}

/* Customer submit button */
.submit-btn {
    width: 100%;
    padding: 16px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 700;
    background-color: #ffcf24;
    color: #1a1a1a;
    border: none;
    border-radius: 12px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(255, 207, 36, 0.3);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(255, 207, 36, 0.4);
    background-color: #ffc910;
}

.submit-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(255, 207, 36, 0.3);
}


/* =========================
   7. QUEUE PAGE
   ========================= */

.page-content h1 {
    font-size: 1.6rem;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0 0 20px 0;
}

/* Queue Container */
#orders {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Queue Card */
.queue-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-left: 6px solid #ffcf24;
    transition: transform 0.2s ease;
}

.queue-card.status-delivered { border-left-color: #4caf50; }
.queue-card.status-rejected { border-left-color: #f44336; }

/* Queue Header */
.queue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.queue-number {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0;
}

/* Status Badges */
.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-pending { background-color: #fffbdf; color: #d49a00; }
.badge-delivered { background-color: #eef7ee; color: #4caf50; }
.badge-rejected { background-color: #fdeeea; color: #f44336; }
.badge-default { background-color: #f0f0f0; color: #555; }

/* Queue Details Grid */
.queue-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.detail-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-size: 0.75rem;
    color: #757575;
    font-weight: 600;
    text-transform: uppercase;
}

.detail-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a1a;
}

.full-width { grid-column: span 2; }

/* Admin Message in Queue */
.admin-msg {
    background-color: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #555;
    border-left: 3px solid #d4d4d4;
    margin-top: 8px;
}

/* Queue Footer */
.queue-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px dashed #e0e0e0;
    font-size: 0.8rem;
    color: #757575;
}

.timer-badge {
    background: #f0f0f0;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
    color: #1a1a1a;
}


/* =========================
   8. ADMIN DASHBOARD
   ========================= */

/* Admin Order Card */
.admin-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    border-top: 6px solid #1a1a1a;
}

.admin-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 16px;
    margin-bottom: 16px;
}

.customer-info h3 {
    margin: 0 0 4px 0;
    font-size: 1.25rem;
    color: #1a1a1a;
}

.order-time {
    font-size: 0.8rem;
    color: #757575;
}

/* Admin Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.info-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-group.full-width {
    grid-column: span 2;
}

.info-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #a0a0a0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.note-box {
    background: #fffbdf;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #d49a00;
    border-left: 3px solid #ffcf24;
}

/* Admin Controls Section */
.admin-controls {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.control-group {
    margin-bottom: 16px;
}

.control-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1a1a1a;
}

/* Modern Inputs (admin) */
.app-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d4d4d4;
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: inherit;
    background-color: #ffffff;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.app-input:focus {
    outline: none;
    border-color: #ffcf24;
    box-shadow: 0 0 0 3px rgba(255, 207, 36, 0.2);
}

select.app-input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23131313%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 16px top 50%;
    background-size: 12px auto;
}

/* Admin Buttons */
.button-group {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.btn {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.btn-save {
    background-color: #ffcf24;
    color: #1a1a1a;
    box-shadow: 0 4px 10px rgba(255, 207, 36, 0.2);
}
.btn-save:hover { transform: translateY(-2px); background-color: #ffc910; }

.btn-delete {
    background-color: #fff0f0;
    color: #dc3545;
    border: 1px solid #ffcccc;
}
.btn-delete:hover { transform: translateY(-2px); background-color: #ffe6e6; }

/* Logout Button */
.logout-btn {
    width: 100%;
    padding: 14px;
    margin-top: 24px;
    background-color: #f0f0f0;
    color: #757575;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background-color: #e0e0e0;
    color: #1a1a1a;
    transform: translateY(-1px);
}


/* =========================
   9. FOOTER
   ========================= */

.minpanda-footer {
    text-align: center;
    padding: 40px 20px 20px 20px;
    margin-top: auto;
    background-color: transparent;
}

.minpanda-footer p {
    margin: 0;
    font-size: 0.8rem;
    color: #a0a0a0;
    font-weight: 500;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: color 0.3s ease;
    cursor: default;
}

.copyleft {
    display: inline-block;
    transform: scaleX(-1);
    font-size: 1rem;
    margin-top: -2px;
}

.minpanda-footer p:hover {
    color: #1a1a1a;
}


/* =========================
   10. REVIEWS PAGE
   ========================= */

/* Page heading */
.reviews-heading {
    font-size: 1.6rem;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0 0 4px 0;
}

.reviews-subheading {
    font-size: 0.9rem;
    color: #757575;
    margin: 0 0 24px 0;
}

/* Shop Review Card */
.shop-review-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    border: 2px solid transparent;
    overflow: hidden;
    margin-bottom: 20px;
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.shop-review-card.expanded {
    border-color: #ffcf24;
    box-shadow: 0 8px 28px rgba(255, 207, 36, 0.2);
}

/* Shop Card Header — clickable area */
.shop-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
}

.shop-card-header:hover {
    background-color: #fffdf0;
}

.shop-card-img {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    object-fit: cover;
    background-color: #f0f0f0;
    flex-shrink: 0;
}

.shop-card-info {
    flex: 1;
}

.shop-card-name {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 6px 0;
}

/* Average star display */
.avg-rating {
    display: flex;
    align-items: center;
    gap: 8px;
}

.avg-stars {
    font-size: 1rem;
    letter-spacing: 2px;
    color: #ffcf24;
}

.avg-score {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1a1a1a;
}

.review-count {
    font-size: 0.8rem;
    color: #a0a0a0;
    font-weight: 500;
}

/* Chevron toggle indicator */
.shop-card-toggle {
    font-size: 1.1rem;
    color: #d4d4d4;
    transition: transform 0.3s ease, color 0.2s ease;
    flex-shrink: 0;
}

.shop-review-card.expanded .shop-card-toggle {
    transform: rotate(90deg);
    color: #ffcf24;
}

/* Collapsible body */
.shop-card-body {
    display: none;
    padding: 0 20px 20px 20px;
    border-top: 1px solid #f0f0f0;
    animation: fadeSlideIn 0.25s ease;
}

.shop-review-card.expanded .shop-card-body {
    display: block;
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Review list */
.review-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 16px 0;
}

/* Individual Review Item */
.review-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 14px 16px;
    border-left: 4px solid #ffcf24;
}

.review-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.review-item-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1a1a1a;
}

.review-item-stars {
    font-size: 0.85rem;
    letter-spacing: 1px;
    color: #ffcf24;
}

.review-item-comment {
    font-size: 0.9rem;
    color: #444;
    margin: 0 0 6px 0;
    line-height: 1.5;
}

.review-item-time {
    font-size: 0.75rem;
    color: #a0a0a0;
}

/* Empty state */
.review-empty {
    text-align: center;
    padding: 20px 0;
    color: #a0a0a0;
    font-size: 0.9rem;
}

.review-empty span {
    display: block;
    font-size: 2rem;
    margin-bottom: 8px;
}

/* "Leave a Review" toggle button */
.btn-leave-review {
    width: 100%;
    padding: 12px;
    background-color: #fffbdf;
    color: #d49a00;
    border: 1.5px solid #ffcf24;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 4px;
}

.btn-leave-review:hover {
    background-color: #ffcf24;
    color: #1a1a1a;
    transform: translateY(-1px);
}

/* Review form */
.review-form {
    display: none;
    background: #ffffff;
    border: 1.5px solid #ffcf24;
    border-radius: 14px;
    padding: 18px;
    margin-top: 12px;
    animation: fadeSlideIn 0.25s ease;
}

.review-form.visible {
    display: block;
}

.review-form-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 14px 0;
}

/* Star picker */
.star-picker {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.star-picker input[type="radio"] {
    display: none;
}

.star-picker label {
    font-size: 1.8rem;
    color: #d4d4d4;
    cursor: pointer;
    transition: color 0.15s ease, transform 0.15s ease;
}

/* Highlight selected and all stars to its left (right in DOM due to row-reverse) */
.star-picker label:hover,
.star-picker label:hover ~ label,
.star-picker input[type="radio"]:checked ~ label {
    color: #ffcf24;
    transform: scale(1.15);
}

.review-form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: #757575;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.review-form input,
.review-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: inherit;
    background: #fcfcfc;
    box-sizing: border-box;
    transition: all 0.2s ease;
    margin-bottom: 12px;
    margin-top: 0;
}

.review-form input:focus,
.review-form textarea:focus {
    outline: none;
    border-color: #ffcf24;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 207, 36, 0.15);
}

.review-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.btn-submit-review {
    flex: 1;
    padding: 12px;
    background-color: #ffcf24;
    color: #1a1a1a;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-submit-review:hover {
    background-color: #ffc910;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 207, 36, 0.35);
}

.btn-cancel-review {
    padding: 12px 18px;
    background-color: #f0f0f0;
    color: #757575;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cancel-review:hover {
    background-color: #e0e0e0;
    color: #1a1a1a;
}


/* =========================
   11. AI FOOD ADVISOR PAGE
   ========================= */

/* Home page action card for the AI advisor */
.ai-advisor-card {
    background-color: #fff8e1;
    border-color: #ffcf24;
    margin-top: 0;
}

.ai-advisor-card .card-icon {
    background: #ffcf24;
}

/* ── Chatbot outer wrapper ── */
.fa-chatbot-wrap {
    display: flex;
    flex-direction: column;
    /* Fill the viewport below nav + divider (~57px) */
    height: calc(100vh - 57px);
    max-width: 760px;
    margin: 0 auto;
    background-color: #f8f9fa;
}

/* ── Chat scrollable area ── */
.fa-chatbot-wrap .chat-area {
    flex: 1;
    overflow-y: auto;
    padding: 20px 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    scroll-behavior: smooth;
    background-color: #f8f9fa;
}

.fa-chatbot-wrap .chat-area::-webkit-scrollbar { width: 4px; }
.fa-chatbot-wrap .chat-area::-webkit-scrollbar-track { background: transparent; }
.fa-chatbot-wrap .chat-area::-webkit-scrollbar-thumb {
    background: #e0e0e0;
    border-radius: 4px;
}

/* ── Welcome section inside chat ── */
.fa-chatbot-wrap .welcome {
    text-align: center;
    padding: 20px 16px 8px;
    animation: fa-fadeInUp 0.5s ease both;
}

.fa-chatbot-wrap .welcome-emoji {
    font-size: 48px;
    line-height: 1;
    margin-bottom: 12px;
    display: block;
    animation: fa-float 3s ease-in-out infinite;
}

@keyframes fa-float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-7px); }
}

.fa-chatbot-wrap .welcome h2 {
    font-size: 1.3rem;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.fa-chatbot-wrap .welcome p {
    font-size: 0.9rem;
    color: #757575;
    line-height: 1.6;
    max-width: 340px;
    margin: 0 auto;
}

/* ── Quick suggestion chips ── */
.fa-chatbot-wrap .suggestions-wrap {
    padding: 4px 0 6px;
    animation: fa-fadeInUp 0.5s 0.15s ease both;
}

.fa-chatbot-wrap .suggestions-label {
    font-size: 11px;
    color: #a0a0a0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    margin-bottom: 10px;
    text-align: center;
}

.fa-chatbot-wrap .suggestions-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.fa-chatbot-wrap .chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    background: #ffffff;
    border: 1.5px solid #e0e0e0;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    user-select: none;
    font-family: inherit;
}

.fa-chatbot-wrap .chip:hover {
    background: #ffcf24;
    border-color: #ffcf24;
    color: #1a1a1a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 207, 36, 0.35);
}

.fa-chatbot-wrap .chip:active { transform: translateY(0); }

/* ── Chat message bubbles ── */
.fa-chatbot-wrap .message {
    display: flex;
    gap: 10px;
    max-width: 100%;
    animation: fa-fadeInUp 0.3s ease both;
}

.fa-chatbot-wrap .message.user { flex-direction: row-reverse; }
.fa-chatbot-wrap .message.ai  { flex-direction: row; }

.fa-chatbot-wrap .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
    align-self: flex-end;
}

.fa-chatbot-wrap .message.user .avatar {
    background: #ffcf24;
}

.fa-chatbot-wrap .message.ai .avatar {
    background: #ffffff;
    border: 1.5px solid #e0e0e0;
}

.fa-chatbot-wrap .bubble {
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.65;
    max-width: calc(100% - 52px);
    word-wrap: break-word;
    position: relative;
}

.fa-chatbot-wrap .message.user .bubble {
    background: #ffcf24;
    color: #1a1a1a;
    border-bottom-right-radius: 4px;
    box-shadow: 0 3px 12px rgba(255, 207, 36, 0.35);
    font-weight: 600;
}

.fa-chatbot-wrap .message.ai .bubble {
    background: #ffffff;
    color: #1a1a1a;
    border-bottom-left-radius: 4px;
    border: 1px solid #e8e8e8;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.fa-chatbot-wrap .bubble-time {
    font-size: 10px;
    opacity: 0.5;
    margin-top: 5px;
    display: block;
}

.fa-chatbot-wrap .message.user .bubble-time { text-align: right; }

/* ── Typing indicator ── */
.fa-chatbot-wrap .typing-bubble {
    background: #ffffff;
    border: 1px solid #e8e8e8;
    padding: 14px 18px;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.fa-chatbot-wrap .typing-dots {
    display: flex;
    gap: 5px;
    align-items: center;
}

.fa-chatbot-wrap .typing-dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ffcf24;
    display: inline-block;
    animation: fa-bounce 1.2s ease-in-out infinite;
}

.fa-chatbot-wrap .typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.fa-chatbot-wrap .typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes fa-bounce {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
    40%            { transform: translateY(-6px); opacity: 1; }
}

/* ── Error bubble ── */
.fa-chatbot-wrap .error-bubble {
    background: #fff0f0;
    border: 1px solid #ffcccc;
    color: #dc3545;
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 13px;
    text-align: center;
}

/* ── Input bar ── */
.fa-chatbot-wrap .input-section {
    padding: 10px 16px 14px;
    background: #ffffff;
    border-top: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.fa-chatbot-wrap .input-bar {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    background: #f8f9fa;
    border: 1.5px solid #e0e0e0;
    border-radius: 50px;
    padding: 8px 8px 8px 18px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.fa-chatbot-wrap .input-bar:focus-within {
    border-color: #ffcf24;
    box-shadow: 0 0 0 3px rgba(255, 207, 36, 0.2);
    background: #ffffff;
}

.fa-chatbot-wrap #user-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: #1a1a1a;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    resize: none;
    max-height: 120px;
    min-height: 24px;
    padding: 3px 0;
}

.fa-chatbot-wrap #user-input::placeholder { color: #a0a0a0; }

.fa-chatbot-wrap #send-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: #ffcf24;
    color: #1a1a1a;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    box-shadow: 0 3px 10px rgba(255, 207, 36, 0.35);
}

.fa-chatbot-wrap #send-btn:hover:not(:disabled) {
    transform: scale(1.08);
    box-shadow: 0 5px 16px rgba(255, 207, 36, 0.5);
    background: #ffc910;
}

.fa-chatbot-wrap #send-btn:active:not(:disabled) { transform: scale(0.95); }

.fa-chatbot-wrap #send-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.fa-chatbot-wrap .input-hint {
    font-size: 11px;
    color: #a0a0a0;
    text-align: center;
    margin-top: 7px;
}

/* ── Animations ── */
@keyframes fa-fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Mobile tweaks ── */
@media (max-width: 480px) {
    .fa-chatbot-wrap .welcome h2  { font-size: 1.1rem; }
    .fa-chatbot-wrap .welcome-emoji { font-size: 40px; }
    .fa-chatbot-wrap .chip        { font-size: 12px; padding: 6px 12px; }
    .fa-chatbot-wrap .bubble      { font-size: 13.5px; }
}