/* --- Modals (Dark Mode) --- */
#modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); /* Darker backdrop */
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000; /* Very high z-index */
    overflow-x: hidden !important;
}
/* --- Bottom Sheet Menu --- */
.menu-sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: none;
    align-items: flex-end;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.menu-sheet-overlay.visible {
    display: flex;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.menu-sheet {
    width: 100%;
    background: #121212;
    border-radius: 24px 24px 0 0;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
    border-top: 1px solid #333;
}

.menu-sheet-overlay.visible .menu-sheet {
    transform: translateY(0);
}

.sheet-handle {
    width: 40px;
    height: 4px;
    background: #333;
    border-radius: 2px;
    margin: 0 auto 20px;
}

/* --- Scores Quick Email Capture Bottom Sheet (Scores Only) --- */
#scores-email-sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10002;
    display: none;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

#scores-email-sheet-overlay.visible {
    display: flex;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.scores-email-sheet {
    width: 100%;
    max-width: 480px;
    background: #141416;
    border-radius: 26px 26px 0 0;
    padding: 20px 24px calc(24px + env(safe-area-inset-bottom, 0px));
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.75);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    box-sizing: border-box;
}

#scores-email-sheet-overlay.visible .scores-email-sheet {
    transform: translateY(0) !important;
}

@media (min-width: 768px) {
    #scores-email-sheet-overlay {
        align-items: center !important;
        justify-content: center !important;
    }
    .scores-email-sheet {
        border-radius: 24px !important;
        border: 1px solid rgba(255, 255, 255, 0.14) !important;
        transform: scale(0.95) !important;
        opacity: 0;
        transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease !important;
    }
    #scores-email-sheet-overlay.visible .scores-email-sheet {
        transform: scale(1) !important;
        opacity: 1 !important;
    }
}

/* --- Responsive Side-Drawer Menu for Desktop/Tablets --- */
@media (min-width: 768px) {
    .menu-sheet-overlay {
        align-items: stretch;
        justify-content: flex-end;
    }

    .menu-sheet {
        width: 420px;
        max-width: 100%;
        height: 100vh;
        border-radius: 24px 0 0 24px;
        border-top: none;
        border-left: 1px solid #222;
        transform: translateX(100%) translateY(0) !important;
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.6);
        display: flex;
        flex-direction: column;
        padding: 30px 24px;
        overflow-y: auto;
    }

    .menu-sheet-overlay.visible .menu-sheet {
        transform: translateX(0) translateY(0) !important;
    }

    .sheet-handle {
        display: none !important;
    }
}

.sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 0 10px;
}

.sheet-header h3 {
    margin: 0;
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: #666;
    font-weight: 800;
}

.sheet-close {
    background: #222;
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sheet-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.sheet-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid #222;
    border-radius: 16px;
    padding: 16px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.sheet-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #444;
}

.sheet-item:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-color);
}

.sheet-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--accent-color, #EE1C23);
    margin-bottom: 2px;
}

.sheet-icon svg {
    width: 24px;
    height: 24px;
    stroke-width: 1.8px;
}

.sheet-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #ccc;
}

.sheet-extensions {
    margin: 0 0 20px 0;
}

.extension-item {
    background: #1e1e1e;
    border: 1px solid #2a2a2a;
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    margin-bottom: 12px;
}

.extension-item:hover {
    background: #252525;
    border-color: #3f3f3f;
}

.extension-item:active {
    transform: scale(0.98);
    background: #2A2A2A;
}

.ext-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    width: 48px;
    height: 48px;
    border-radius: 12px;
    color: var(--accent-color, #EE1C23);
    flex-shrink: 0;
}

.ext-icon svg {
    width: 24px;
    height: 24px;
    stroke-width: 1.8px;
}

.ext-content {
    flex: 1;
}

.ext-title {
    font-weight: 800;
    font-size: 1.05rem;
    color: #fff;
    margin-bottom: 2px;
}

.ext-subtitle {
    font-size: 0.75rem;
    color: #888;
}

.ext-arrow {
    color: #444;
    font-size: 1.2rem;
    font-weight: 900;
}

.sheet-footer {
    border-top: 1px solid #222;
    padding-top: 20px;
    margin-top: 10px;
}

.sheet-logout-btn {
    width: 100%;
    background: rgba(255, 68, 68, 0.05);
    border: 1px solid rgba(255, 68, 68, 0.2);
    color: #ff4444;
    padding: 14px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.sheet-logout-btn:hover {
    background: rgba(255, 68, 68, 0.1);
    border-color: rgba(255, 68, 68, 0.4);
}

.sheet-logout-btn:active {
    transform: scale(0.98);
    background: rgba(255, 68, 68, 0.15);
    border-color: #ff4444;
}

.hidden {
    display: none !important;
}

/* --- Stepper UI (Change Count) --- */
.stepper-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #252525;
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 15px;
    border: 1px solid #333;
}

.stepper-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stepper-label strong {
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
}

.stepper-label span {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stepper-controls {
    display: flex;
    align-items: center;
    gap: 24px;
}

.stepper-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #1a1a1a;
    border: 1px solid #444;
    color: white;
    font-size: 1.8rem;
    font-weight: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.stepper-btn:active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    transform: scale(0.9);
}

.stepper-value {
    font-size: 1.8rem;
    font-weight: 900;
    min-width: 30px;
    text-align: center;
    color: var(--accent-color);
}

#details-modal, #add-driver-modal {
    background-color: #1a1a1a;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
    border-radius: 12px;
    padding: 24px;
    position: relative;
    z-index: 2001; /* Above backdrop */
}

/* Ensure hidden state applies to the modal content wrappers too if logic requires it, 
   though usually we hide the backdrop. Just in case: */
#details-modal.hidden, #add-driver-modal.hidden {
    display: none;
}

/* --- Modern Modal Internals --- */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
    margin-bottom: 24px;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

/* Modern Close Button */
.close-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem; /* Larger touch target */
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.close-btn:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.1);
}

/* Modal Content Grid */
.modal-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
}

.detail-item {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 14px 0;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.detail-item strong {
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
    opacity: 0.7;
    display: block;
}

.detail-item span, .detail-item div {
    color: var(--text-primary);
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.4;
}

/* Detail Modal Inputs (Edit Mode Lock & Alignment) */
#details-modal .detail-item input,
#details-modal .detail-item select,
#details-modal .notes textarea {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    padding: 12px 14px !important;
    background: #242424 !important;
    border: 1px solid #3d3d3d !important;
    border-radius: 8px !important;
    color: #ffffff !important;
    font-size: 0.95rem !important;
    font-family: inherit !important;
    margin-top: 4px !important;
    line-height: normal !important;
    -webkit-appearance: none;
    appearance: none;
}

#details-modal .detail-item input[type="date"],
#details-modal .detail-item input[type="time"] {
    min-width: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    background-color: #242424 !important;
    color: #ffffff !important;
}

#details-modal .detail-item input:focus,
#details-modal .notes textarea:focus {
    border-color: var(--accent-color, #EE1C23) !important;
    outline: none !important;
}

/* Touch-Friendly Guest Stepper Counter */
.guest-stepper-container {
    display: flex;
    align-items: center;
    background: #1e1e1e;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    height: 48px;
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.guest-stepper-container .stepper-btn {
    width: 52px;
    height: 100%;
    background: #2a2a2a;
    border: none;
    color: #ffffff;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s ease, transform 0.05s ease;
}

.guest-stepper-container .stepper-btn:active {
    background: #383838;
    transform: scale(0.96);
}

.guest-stepper-container .stepper-input {
    flex: 1;
    height: 100%;
    background: transparent !important;
    border: none !important;
    text-align: center;
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    padding: 0 !important;
    margin: 0 !important;
    pointer-events: none;
    -moz-appearance: textfield;
}

.guest-stepper-container .stepper-input::-webkit-outer-spin-button,
.guest-stepper-container .stepper-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Notes Section */
.notes {
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    margin-top: 10px;
    color: var(--text-primary);
}

.notes strong {
    display: block;
    margin-bottom: 8px;
    color: var(--accent-color);
}

.notes p {
    margin: 0;
    line-height: 1.5;
    color: #ddd;
}

/* Modal Footer Actions */
.modal-footer {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end; /* Right align buttons */
    gap: 12px;
}

.modal-footer button {
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s;
}

.secondary-btn {
    background-color: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color) !important;
}

.secondary-btn:hover {
    border-color: var(--text-primary) !important;
    color: var(--text-primary);
}

/* Primary Action styling for buttons inside modal (add specific classes if needed in JS) */
#details-modal button.primary-action { 
    background-color: var(--accent-color);
    color: white;
}

#details-modal button.primary-action:hover {
    background-color: var(--accent-hover);
}

@media (min-width: 500px) {
    .detail-item {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    .detail-item strong {
        margin-bottom: 0;
    }
    #details-modal .detail-item {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    #details-modal .detail-item strong {
        margin-bottom: 6px !important;
    }
}

/* Driver List in Modal */
.driver-list {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.driver-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding: 16px;
    transition: background-color 0.2s;
}

.driver-card:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.driver-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.driver-card .driver-name {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
}

.driver-card .driver-phone {
    display: none; /* Hide phone number per request */
}

.driver-card .driver-bus-type {
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
}

.driver-card .assign-btn {
    width: auto;
    padding: 8px 16px;
    font-size: 0.85rem;
    background-color: var(--accent-color);
    border-radius: 6px;
    margin: 0; /* Remove default margins */
}


/* Quick Menu */
.quick-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 2999;
}

.quick-menu-container {
    position: absolute;
    background-color: #252525;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 200px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    z-index: 3000;
    overflow: hidden;
}

.quick-menu-item {
    display: block;
    width: 100%;
    padding: 12px 16px;
    text-align: left;
    background: none;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.quick-menu-item:last-child {
    border-bottom: none;
}

.quick-menu-item:hover {
    background-color: #333;
}

.quick-menu-item.destructive {
    color: var(--critical-color);
}

.quick-menu-item.destructive:hover {
    background-color: rgba(244, 67, 54, 0.1);
}

/* --- Category Hardtap / Long-Press & iOS Mini Quick Menu --- */
.customer-choice-card {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.customer-choice-card.category-card-pressing {
    transform: scale(0.975);
    background: rgba(255, 255, 255, 0.08) !important;
    transition: transform 0.15s cubic-bezier(0.2, 0, 0, 1), background-color 0.15s ease;
}

.customer-choice-card.category-card-highlighted {
    transform: scale(1.02) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.75), 0 0 0 2px var(--accent-color, #E60023) !important;
    border-color: var(--accent-color, #E60023) !important;
    z-index: 3605 !important;
    position: relative !important;
    transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.2s ease;
}

.customer-choice-card.category-card-dimmed {
    opacity: 0.35 !important;
    filter: blur(1.5px) !important;
    pointer-events: none !important;
    transition: opacity 0.25s ease, filter 0.25s ease;
}

.category-quick-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 3600;
    animation: flowFadeIn 0.18s ease forwards;
}

.category-quick-menu-container {
    position: fixed;
    background: #1e1e1e;
    background: rgba(30, 30, 30, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    min-width: 220px;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.06);
    z-index: 3610;
    overflow: hidden;
    animation: quickMenuPop 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transform-origin: top left;
}

@keyframes quickMenuPop {
    from {
        opacity: 0;
        transform: scale(0.92);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}


/* --- Header Dropdown Menu --- */
.header-dropdown {
    position: absolute;
    top: 50px; /* Below the button */
    right: 0; /* Anchor to right edge */
    width: 220px;
    background-color: #252525;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    z-index: 3000;
    overflow: hidden;
    padding: 8px 0;
    animation: fadeInDropdown 0.2s ease;
}

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

.dropdown-item {
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.dropdown-item .icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.create-btn.active {
    background-color: var(--accent-color) !important;
}

.create-btn.active .inner-square {
    background-color: rgba(255,255,255,0.2);
}


/* --- Bottom Sheet Menu (Moved & Unified Above) --- */

/* --- Stepper UI (Change Count) --- */
.stepper-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #252525;
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 15px;
    border: 1px solid #333;
}

.stepper-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stepper-label strong {
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
}

.stepper-label span {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stepper-controls {
    display: flex;
    align-items: center;
    gap: 24px;
}

.stepper-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #1a1a1a;
    border: 1px solid #444;
    color: white;
    font-size: 1.8rem;
    font-weight: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.stepper-btn:active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    transform: scale(0.9);
}

.stepper-value {
    font-size: 1.8rem;
    font-weight: 900;
    min-width: 30px;
    text-align: center;
    color: var(--accent-color);
}

.hidden {
    display: none !important;
}

/* --- Rachel's Portal Custom Accordion Menu --- */
body.rachels-portal .rachels-accordion-container {
    display: flex;
    flex-direction: column;
    gap: 4px; /* Thin space between each accordion section */
    width: 100%;
}

body.rachels-portal .rachels-accordion-header {
    background: #1e1e1e;
    border: 1px solid #2a2a2a;
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    margin-bottom: 4px; /* Thin space matching headers */
    width: 100%;
}

body.rachels-portal .rachels-accordion-header:hover {
    background: #252525;
    border-color: #3f3f3f;
}

body.rachels-portal .rachels-accordion-header:active {
    transform: scale(0.98);
    background: #2a2a2a;
}

body.rachels-portal .rachels-accordion-header.active {
    border-color: #C8102E; /* Crimson border when active */
}

body.rachels-portal .rachels-accordion-arrow {
    color: #444;
    font-size: 1.2rem;
    font-weight: 900;
}

body.rachels-portal .rachels-accordion-header.active .rachels-accordion-arrow {
    color: #C8102E;
}

body.rachels-portal .rachels-accordion-content {
    background: #121212;
    padding: 10px 5px 15px 5px;
    border-radius: 0 0 12px 12px;
}

body.rachels-portal .rachels-square-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
}

/* Thin space matching accordion sections */

body.rachels-portal .rachels-square-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid #222;
    border-radius: 12px;
    padding: 16px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

body.rachels-portal .rachels-square-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #444;
}

body.rachels-portal .rachels-square-item:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.08);
    border-color: #C8102E; /* Crimson accent on active */
}

body.rachels-portal .rachels-square-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: #C8102E; /* Crimson Icons for Rachel's */
}

body.rachels-portal .rachels-square-icon svg {
    width: 24px;
    height: 24px;
    stroke-width: 2px;
}

body.rachels-portal .rachels-square-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #ccc;
}

/* Force bottom sheet to be exactly full-screen (100% height, zero border radius, top 0) on Rachel's */
body.rachels-portal .bottom-sheet {
    height: 100% !important;
    max-height: 100% !important;
    top: 0 !important;
    bottom: 0 !important;
    border-radius: 0 !important;
}

body.rachels-portal {
    --accent-color: #C8102E !important; /* Elegant Rachel's Crimson Red */
    --accent-hover: #9c0b20 !important;  /* Darker Crimson hover */
}

/* --- Peppermint Hippo Portal Accordion Menu UI Overrides --- */
.hippo-accordion-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.hippo-accordion-header {
    background: #1e1e1e;
    border: 1px solid #2a2a2a;
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    margin-bottom: 4px;
    width: 100%;
}

.hippo-accordion-header:hover {
    background: #252525;
    border-color: #3f3f3f;
}

.hippo-accordion-header:active {
    transform: scale(0.98);
    background: #2a2a2a;
}

.hippo-accordion-header.active {
    border-color: var(--accent-color, #E60023);
}

.hippo-accordion-arrow {
    color: #444;
    font-size: 1.2rem;
    font-weight: 900;
}

.hippo-accordion-header.active .hippo-accordion-arrow {
    color: var(--accent-color, #E60023);
}

.hippo-accordion-content {
    background: #121212;
    padding: 10px 5px 15px 5px;
    border-radius: 0 0 12px 12px;
}

.hippo-square-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
}

.hippo-square-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid #222;
    border-radius: 12px;
    padding: 16px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.hippo-square-item:hover {
    background: rgba(230, 0, 35, 0.05);
    border-color: rgba(230, 0, 35, 0.35);
}

.hippo-square-item:active {
    transform: scale(0.95);
    background: rgba(230, 0, 35, 0.1);
    border-color: var(--accent-color, #E60023);
}

.hippo-square-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--accent-color, #E60023);
    transition: transform 0.2s ease, color 0.2s ease;
}

.hippo-square-icon svg {
    width: 24px;
    height: 24px;
    stroke-width: 2px;
}

.hippo-square-item:hover .hippo-square-icon,
.hippo-square-item:active .hippo-square-icon {
    color: #ff334b;
    transform: scale(1.08);
}

.hippo-square-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #FFFFFF;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


