/* =========================================================
   AI COOKING BOT & KITCHEN HUB STYLES (cooking.css)
   Aesthetic: Pastel Rose, Lavender, Hydrangea Blue, Frosted Glass
   ========================================================= */

.cooking-shell {
    --app-bg-image: url('../imgs/water.jpg');
    --app-bg-overlay: linear-gradient(135deg, rgba(30, 27, 75, 0.45), rgba(88, 28, 135, 0.35), rgba(241, 118, 172, 0.3));
}

.cooking-main {
    flex: 1;
    display: flex;
    position: relative;
    overflow: hidden;
    min-height: 0;
    height: 100%;
}

/* =========================================================
   EDGE BOOKMARK NAVIGATION
   ========================================================= */
.edge-bookmarks {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 60;
    pointer-events: auto;
}

.bookmark-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.95);
    border-right: none;
    border-radius: 16px 0 0 16px;
    padding: 10px 16px 10px 14px;
    font-size: 0.92rem;
    font-weight: 700;
    color: #4338ca;
    cursor: pointer;
    box-shadow: -4px 6px 16px rgba(49, 46, 129, 0.22);
    transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
    transform: translateX(4px);
}

.bookmark-tab:hover {
    transform: translateX(-6px);
    background: #ffffff;
    box-shadow: -6px 8px 22px rgba(99, 102, 241, 0.35);
}

.bookmark-tab.is-active {
    background: linear-gradient(135deg, #ede9fe, #dbeafe);
    border-color: #a855f7;
    color: #6b21a8;
    transform: translateX(-4px);
}

.bookmark-ai {
    color: #6d28d9;
}

.bookmark-ai .bookmark-icon {
    font-size: 1.15rem;
    filter: drop-shadow(0 0 6px rgba(168, 85, 247, 0.8));
    animation: pulseCore 2.5s infinite;
}

@keyframes pulseCore {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 5px #a855f7); }
    50% { transform: scale(1.18); filter: drop-shadow(0 0 10px #38bdf8); }
}

/* =========================================================
   SCROLLABLE CONTENT WRAPPER
   ========================================================= */
.cooking-viewport {
    flex: 1;
    overflow-y: auto;
    padding: 22px 70px 24px 28px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-height: 0;
}

/* Custom Scrollbars */
.cooking-viewport::-webkit-scrollbar,
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.cooking-viewport::-webkit-scrollbar-thumb,
.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(168, 85, 247, 0.35);
    border-radius: 999px;
}

/* =========================================================
   SECTION 1: CENTRAL HUB
   ========================================================= */
.hub-view {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.hub-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.hub-header-title {
    font-size: clamp(1.8rem, 3.8vw, 2.5rem);
    color: #4c1d95;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    gap: 10px;
}

.hub-header-title span {
    font-size: 1.8rem;
}

.hub-subtitle {
    font-size: 0.95rem;
    color: #5b21b6;
    opacity: 0.85;
}

/* Featured Daily Bake Banner */
.featured-bake-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(243, 232, 255, 0.85));
    border: 2px solid rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 20px;
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 22px;
    align-items: center;
    box-shadow: 0 12px 30px rgba(67, 56, 202, 0.18);
    position: relative;
    overflow: hidden;
}

.featured-bake-img {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 16px;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.25);
    background: #f1f5f9;
}

.featured-bake-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.featured-badge-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.bake-badge {
    background: linear-gradient(120deg, #f176ac, #9d65e9);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bake-badge.time {
    background: rgba(99, 102, 241, 0.18);
    color: #4338ca;
}

.featured-bake-title {
    font-size: clamp(1.4rem, 2.5vw, 1.9rem);
    color: #312e81;
    font-weight: 800;
}

.featured-bake-desc {
    color: #4b5563;
    font-size: 0.94rem;
    line-height: 1.45;
}

.featured-bake-actions {
    margin-top: 8px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.action-btn-primary {
    background: linear-gradient(125deg, #8b5cf6, #3b82f6);
    color: #fff;
    border: none;
    padding: 10px 22px;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(124, 58, 237, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.action-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(124, 58, 237, 0.42);
}

.action-btn-secondary {
    background: rgba(255, 255, 255, 0.8);
    color: #4338ca;
    border: 1px solid rgba(199, 210, 254, 0.8);
    padding: 10px 20px;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.action-btn-secondary:hover {
    background: #ffffff;
    transform: translateY(-2px);
}

/* Floral Motifs Divider */
.floral-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: #8b5cf6;
    margin: 4px 0;
    opacity: 0.85;
}

.floral-divider::before,
.floral-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.4), transparent);
}

.floral-motif-icon {
    font-size: 1.3rem;
    filter: drop-shadow(0 2px 4px rgba(168, 85, 247, 0.3));
}

/* Macro Categories & Kitchen Timer Grid */
.hub-bottom-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 20px;
}

@media (max-width: 900px) {
    .featured-bake-card { grid-template-columns: 1fr; }
    .hub-bottom-grid { grid-template-columns: 1fr; }
}

/* Category Grid */
.category-block {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.block-title {
    font-size: 1.25rem;
    color: #4338ca;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.category-card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 16px;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.1);
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.category-card:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 22px rgba(79, 70, 229, 0.2);
    background: #ffffff;
}

.cat-icon {
    font-size: 1.8rem;
    margin-bottom: 2px;
}

.cat-name {
    font-size: 1.05rem;
    font-weight: 800;
    color: #312e81;
}

.cat-count {
    font-size: 0.8rem;
    color: #6b7280;
}

/* Kitchen Timer Widget */
.kitchen-timer-widget {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.85), rgba(238, 242, 255, 0.8));
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 8px 20px rgba(67, 56, 202, 0.12);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.timer-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.timer-notif-toggle-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(199, 210, 254, 0.8);
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #4f46e5;
    cursor: pointer;
    transition: all 0.2s ease;
}

.timer-notif-toggle-btn.is-active {
    background: #10b981;
    color: #fff;
    border-color: #10b981;
}

.timer-display {
    font-size: 2.8rem;
    font-weight: 800;
    color: #3730a3;
    letter-spacing: 2px;
    text-align: center;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    padding: 10px;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.timer-display.is-alarm {
    animation: timerAlarmPulse 0.8s infinite alternate;
    color: #dc2626 !important;
}

@keyframes timerAlarmPulse {
    from {
        box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
        background: rgba(254, 226, 226, 0.9);
    }
    to {
        box-shadow: 0 0 25px rgba(239, 68, 68, 0.85);
        background: rgba(254, 202, 202, 1);
    }
}

/* Custom Timer Controls */
.custom-timer-box {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(224, 231, 255, 0.8);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.custom-inputs-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.time-field {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.time-field input {
    width: 44px;
    height: 34px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 800;
    color: #3730a3;
    border: 1.5px solid rgba(199, 210, 254, 0.9);
    border-radius: 8px;
    background: #fff;
    outline: none;
    transition: border-color 0.2s;
}

.time-field input:focus {
    border-color: #6366f1;
}

.time-field label {
    font-size: 0.65rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    margin-top: 2px;
}

.time-colon {
    font-size: 1.2rem;
    font-weight: 800;
    color: #6366f1;
    margin-bottom: 12px;
}

.timer-set-btn {
    background: linear-gradient(120deg, #6366f1, #4f46e5);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 7px 14px;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
    margin-left: 4px;
    margin-bottom: 12px;
    transition: transform 0.2s, background 0.2s;
}

.timer-set-btn:hover {
    transform: scale(1.04);
}

.quick-adjust-group {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.quick-step-btn {
    background: rgba(243, 244, 246, 0.9);
    border: 1px solid rgba(209, 213, 219, 0.8);
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-step-btn:hover {
    background: #ede9fe;
    color: #4f46e5;
    border-color: #c7d2fe;
}

.timer-presets {
    display: flex;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
}

.timer-preset-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(199, 210, 254, 0.8);
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #4f46e5;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.timer-preset-btn:hover {
    background: #ede9fe;
    transform: scale(1.05);
}

.timer-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.timer-btn {
    padding: 8px 18px;
    border-radius: 999px;
    border: none;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.timer-btn.start {
    background: linear-gradient(120deg, #10b981, #059669);
    color: white;
}

.timer-btn.pause {
    background: linear-gradient(120deg, #f59e0b, #d97706);
    color: white;
}

.timer-btn.reset {
    background: rgba(229, 231, 235, 0.9);
    color: #4b5563;
}

.timer-btn:hover {
    transform: scale(1.05);
}

/* Timer Alarm Toast Modal */
.timer-alarm-toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    animation: toastPopIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.alarm-toast-card {
    background: linear-gradient(135deg, #ffffff, #fef2f2);
    border: 2px solid #ef4444;
    border-radius: 20px;
    padding: 16px 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 16px 35px rgba(239, 68, 68, 0.3);
}

.alarm-icon {
    font-size: 2.5rem;
    animation: bellRing 0.8s infinite;
}

@keyframes bellRing {
    0%, 100% { transform: rotate(0deg); }
    20% { transform: rotate(18deg); }
    40% { transform: rotate(-18deg); }
    60% { transform: rotate(10deg); }
    80% { transform: rotate(-10deg); }
}

.alarm-text h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: #b91c1c;
    margin: 0;
}

.alarm-text p {
    font-size: 0.84rem;
    color: #4b5563;
    margin: 3px 0 0 0;
}

.alarm-dismiss-btn {
    background: linear-gradient(120deg, #ef4444, #dc2626);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 8px 18px;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
    transition: transform 0.2s;
}

.alarm-dismiss-btn:hover {
    transform: scale(1.06);
}

@keyframes toastPopIn {
    from {
        opacity: 0;
        transform: translate(-50%, -20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0) scale(1);
    }
}

/* =========================================================
   SECTION 2: MY COOKBOOK (RECIPES SCREEN)
   ========================================================= */
.cookbook-view {
    display: none;
    flex-direction: column;
    gap: 20px;
}

.cookbook-view.is-active,
.hub-view.is-active {
    display: flex;
}

.cookbook-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

/* Pill-Shaped Filter Tags in Soft Lavender */
.filter-tags-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-pill {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(221, 214, 254, 0.8);
    color: #5b21b6;
    padding: 7px 16px;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(109, 40, 217, 0.08);
    transition: all 0.22s ease;
}

.filter-pill:hover {
    background: rgba(237, 233, 254, 0.9);
    transform: translateY(-2px);
}

.filter-pill.is-active {
    background: linear-gradient(135deg, #c084fc, #818cf8);
    color: #ffffff;
    border-color: #a855f7;
    box-shadow: 0 4px 14px rgba(168, 85, 247, 0.35);
}

/* Recipe Grid Gallery */
.recipe-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
}

.recipe-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    border: 1.5px solid rgba(255, 255, 255, 0.95);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 22px rgba(67, 56, 202, 0.12);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.recipe-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(67, 56, 202, 0.22);
}

.recipe-card-img-wrap {
    width: 100%;
    height: 160px;
    position: relative;
    overflow: hidden;
    background: #f1f5f9;
}

.recipe-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.recipe-card:hover .recipe-card-img {
    transform: scale(1.06);
}

.recipe-difficulty-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
    color: #4338ca;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.recipe-card-body {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.recipe-card-title {
    font-size: 1.12rem;
    font-weight: 800;
    color: #312e81;
}

.recipe-card-meta {
    font-size: 0.82rem;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 12px;
}

.recipe-card-tip-preview {
    font-size: 0.82rem;
    color: #7c3aed;
    font-style: italic;
    margin-top: 4px;
}

/* Recipe Detail Modal */
.recipe-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(6px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.recipe-modal-overlay[hidden] {
    display: none !important;
}

.recipe-modal-card {
    background: #ffffff;
    width: min(650px, 92%);
    max-height: 85vh;
    border-radius: 20px;
    overflow-y: auto;
    padding: 24px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
}

.recipe-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #ede9fe;
    color: #6b21a8;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
}

.recipe-modal-title {
    font-size: 1.6rem;
    color: #312e81;
    font-weight: 800;
}

.recipe-ingredients-list {
    list-style: none;
    display: grid;
    gap: 6px;
    margin-top: 6px;
}

.recipe-ingredients-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.92rem;
    color: #374151;
}

.recipe-steps-text {
    white-space: pre-line;
    line-height: 1.6;
    color: #4b5563;
    font-size: 0.94rem;
}

.recipe-ai-tip-box {
    background: linear-gradient(135deg, #ede9fe, #dbeafe);
    border-left: 4px solid #a855f7;
    padding: 12px 16px;
    border-radius: 0 12px 12px 0;
    font-size: 0.9rem;
    color: #4c1d95;
    font-style: italic;
}

/* =========================================================
   SECTION 3: SEAMLESS SLIDE-IN AI CHAT OVERLAY
   ========================================================= */
.ai-chat-drawer {
    position: absolute;
    top: 0;
    right: 0;
    width: min(440px, 92%);
    height: 100%;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(14px);
    border-left: 2px solid rgba(168, 85, 247, 0.4);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.4);
    z-index: 80;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.ai-chat-drawer.is-open {
    transform: translateX(0);
}

.chat-header {
    padding: 14px 18px;
    background: linear-gradient(90deg, #1e1b4b, #312e81);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-avatar-core {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a855f7, #38bdf8);
    display: grid;
    place-items: center;
    font-size: 1rem;
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.6);
}

.chat-title-text h3 {
    font-size: 1rem;
    font-weight: 700;
}

.chat-title-text span {
    font-size: 0.75rem;
    color: #a5b4fc;
}

.chat-close-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.chat-close-btn:hover {
    color: #fff;
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.chat-bubble {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.92rem;
    line-height: 1.5;
    word-break: break-word;
}

/* Deep Slate User Bubble */
.chat-bubble.user {
    align-self: flex-end;
    background: linear-gradient(135deg, #334155, #1e293b);
    color: #f8fafc;
    border-bottom-right-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Soft Blue-Violet AI Bubble */
.chat-bubble.ai {
    align-self: flex-start;
    background: linear-gradient(135deg, #e0e7ff, #ede9fe);
    color: #1e1b4b;
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.15);
}

.chat-bubble.ai strong {
    color: #4338ca;
}

.save-to-cookbook-btn {
    margin-top: 10px;
    background: linear-gradient(120deg, #7c3aed, #4f46e5);
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.save-to-cookbook-btn:hover {
    transform: scale(1.04);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
}

/* Chat Input Bar & Integrated Widgets */
.chat-input-area {
    padding: 12px 14px;
    background: rgba(15, 23, 42, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-tool-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.chat-tool-pill {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #c7d2fe;
    font-size: 0.78rem;
    padding: 4px 10px;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.chat-tool-pill:hover,
.chat-tool-pill.is-active {
    background: #4338ca;
    color: #ffffff;
}

.chat-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.chat-input {
    flex: 1;
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 10px 14px;
    color: #fff;
    font-size: 0.92rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.chat-input:focus {
    border-color: #a855f7;
}

.voice-btn {
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #a5b4fc;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

.voice-btn.is-listening {
    background: #ef4444;
    color: #fff;
    animation: pulseMic 1.2s infinite;
}

@keyframes pulseMic {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.12); }
}

.chat-send-btn {
    background: linear-gradient(135deg, #a855f7, #3b82f6);
    border: none;
    color: #fff;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.chat-send-btn:hover {
    transform: scale(1.06);
}

/* Unit Converter Flyout Inside Chat */
.unit-converter-drawer {
    background: rgba(30, 41, 59, 0.95);
    border-radius: 12px;
    padding: 10px 14px;
    display: none;
    flex-direction: column;
    gap: 8px;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.unit-converter-drawer.is-visible {
    display: flex;
}

.conv-inputs {
    display: flex;
    gap: 8px;
    align-items: center;
}

.conv-inputs input,
.conv-inputs select {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.85rem;
    outline: none;
}

.conv-result-text {
    font-size: 0.86rem;
    color: #38bdf8;
    font-weight: 700;
}

/* Save Recipe Customization Modal */
.save-recipe-card {
    max-width: 520px;
    background: #ffffff;
    border: 1px solid rgba(168, 85, 247, 0.2);
}

.save-recipe-header {
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 12px;
}

.save-recipe-badge {
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #7c3aed;
    background: #ede9fe;
    padding: 3px 10px;
    border-radius: 999px;
    display: inline-block;
}

.save-recipe-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 6px;
}

.save-form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-align: left;
}

.save-form-group label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #475569;
}

.save-form-group input,
.save-form-group select {
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    padding: 9px 12px;
    font-size: 0.88rem;
    color: #1e293b;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.save-form-group input:focus,
.save-form-group select:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
    background: #fff;
}

.save-form-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 10px;
}

@media (max-width: 540px) {
    .save-form-row {
        grid-template-columns: 1fr;
    }
}

.save-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
}

.btn-cancel {
    background: #f1f5f9;
    border: none;
    color: #64748b;
    font-weight: 700;
    padding: 10px 18px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-cancel:hover {
    background: #e2e8f0;
    color: #334155;
}
