/* ==========================================
   TECHCENTER ANDROID DISPLAY TOOLBAR
   ANDROID APP ONLY
========================================== */

#android-display-toolbar,
#android-notification-overlay {
    display: none;
}

html.techcenter-android-app #android-display-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 7px;
    width: 100%;
    padding: 9px 10px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    position: relative;
    z-index: 100;
    box-sizing: border-box;
}

html.techcenter-android-app .android-tool-button {
    min-width: 40px;
    min-height: 40px;
    padding: 5px 9px;
    border: none;
    border-radius: 11px;
    background: #f1f5f9;
    color: #1e293b;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    position: relative;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

html.techcenter-android-app .android-tool-button:active {
    transform: scale(.95);
    background: #dbeafe;
}

html.techcenter-android-app .android-zoom-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

html.techcenter-android-app #android-zoom-level {
    min-width: 43px;
    text-align: center;
    font-size: 12px;
    font-weight: 800;
    color: #475569;
}

html.techcenter-android-app .android-notification-count {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: #dc2626;
    color: white;
    font-size: 10px;
    font-weight: 800;
    border: 2px solid white;
}

html.techcenter-android-app .android-notification-count[hidden] {
    display: none !important;
}

/* ==========================================
   NOTIFICATION INBOX
========================================== */

html.techcenter-android-app #android-notification-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(15, 23, 42, .65);
    padding: 12px;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
}

html.techcenter-android-app #android-notification-overlay:not([hidden]) {
    display: flex !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483000 !important;
    align-items: center !important;
    justify-content: center !important;
}

html.techcenter-android-app #android-notification-panel {
    width: 100%;
    max-width: 520px;
    max-height: 85dvh;
    overflow-y: auto;
    background: white;
    color: #1e293b;
    border-radius: 19px;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    padding: 17px;
    box-sizing: border-box;
}

html.techcenter-android-app .android-notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding-bottom: 13px;
    border-bottom: 1px solid #e5e7eb;
}

html.techcenter-android-app .android-notification-header h2 {
    font-size: 21px;
    font-weight: 800;
}

html.techcenter-android-app .android-notification-header p {
    font-size: 12px;
    color: #64748b;
    margin-top: 3px;
}

html.techcenter-android-app #android-notification-close {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f1f5f9;
    font-size: 19px;
}

html.techcenter-android-app .android-notification-actions {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 0;
}

html.techcenter-android-app .android-notification-actions button {
    font-size: 11px;
    font-weight: 700;
    color: #2563eb;
    padding: 7px;
}

html.techcenter-android-app #android-notification-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

html.techcenter-android-app .android-notification-item {
    width: 100%;
    display: flex;
    gap: 10px;
    text-align: left;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 13px;
    background: #f8fafc;
    color: #1e293b;
}

html.techcenter-android-app .android-notification-item.unread {
    background: #eff6ff;
    border-color: #bfdbfe;
}

html.techcenter-android-app .android-notification-item-content {
    flex: 1;
    min-width: 0;
}

html.techcenter-android-app .android-notification-item-title {
    font-size: 13px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

html.techcenter-android-app .android-notification-item-message {
    font-size: 12px;
    color: #475569;
    margin-top: 4px;
    overflow-wrap: anywhere;
}

html.techcenter-android-app .android-notification-item-date {
    font-size: 10px;
    color: #64748b;
    margin-top: 7px;
}

html.techcenter-android-app .android-notification-unread-dot {
    width: 9px;
    height: 9px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #2563eb;
    margin-top: 5px;
}

html.techcenter-android-app #android-notification-empty {
    text-align: center;
    padding: 35px 15px;
    color: #64748b;
}

html.techcenter-android-app #android-notification-empty p {
    font-weight: 800;
    margin: 10px 0 5px;
}

html.techcenter-android-app #android-notification-empty small {
    font-size: 11px;
}

html.techcenter-android-app #android-notification-detail {
    padding-top: 15px;
}

html.techcenter-android-app #android-notification-back {
    color: #2563eb;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 20px;
}

html.techcenter-android-app #android-detail-title {
    font-size: 19px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

html.techcenter-android-app #android-detail-date {
    font-size: 11px;
    color: #64748b;
    margin: 8px 0 17px;
}

html.techcenter-android-app #android-detail-message {
    font-size: 14px;
    line-height: 1.7;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

html.techcenter-android-app #android-detail-link {
    display: inline-block;
    margin-top: 20px;
    color: #2563eb;
    font-weight: 700;
    font-size: 13px;
}

/* ==========================================
   ANDROID DARK MODE
========================================== */

html.techcenter-android-app.tc-dark {
    color-scheme: dark;
    background: #0f172a !important;
}

html.techcenter-android-app.tc-dark body {
    background: #0f172a !important;
    color: #e2e8f0 !important;
}

html.techcenter-android-app.tc-dark #android-display-toolbar {
    background: #111827 !important;
    border-color: #334155 !important;
}

html.techcenter-android-app.tc-dark .android-tool-button {
    background: #263449 !important;
    color: #f8fafc !important;
}

html.techcenter-android-app.tc-dark #android-zoom-level {
    color: #e2e8f0 !important;
}

html.techcenter-android-app.tc-dark #android-notification-panel {
    background: #111827 !important;
    color: #f8fafc !important;
}

html.techcenter-android-app.tc-dark .android-notification-header {
    border-color: #334155 !important;
}

html.techcenter-android-app.tc-dark .android-notification-header p,
html.techcenter-android-app.tc-dark .android-notification-item-message,
html.techcenter-android-app.tc-dark .android-notification-item-date,
html.techcenter-android-app.tc-dark #android-detail-date {
    color: #cbd5e1 !important;
}

html.techcenter-android-app.tc-dark .android-notification-item {
    background: #1e293b !important;
    color: #f8fafc !important;
    border-color: #334155 !important;
}

html.techcenter-android-app.tc-dark .android-notification-item.unread {
    background: #172b48 !important;
    border-color: #2563eb !important;
}

html.techcenter-android-app.tc-dark #android-notification-close {
    background: #263449 !important;
    color: white !important;
}

html.techcenter-android-app.tc-dark #android-notification-empty {
    color: #cbd5e1 !important;
}

/* Common Tailwind backgrounds */
html.techcenter-android-app.tc-dark .bg-white,
html.techcenter-android-app.tc-dark .bg-gray-50,
html.techcenter-android-app.tc-dark .bg-gray-100,
html.techcenter-android-app.tc-dark .bg-slate-50,
html.techcenter-android-app.tc-dark .bg-slate-100,
html.techcenter-android-app.tc-dark .bg-blue-50,
html.techcenter-android-app.tc-dark .bg-indigo-50,
html.techcenter-android-app.tc-dark .bg-purple-50,
html.techcenter-android-app.tc-dark .bg-green-50,
html.techcenter-android-app.tc-dark .bg-yellow-50 {
    background-color: #1e293b !important;
}

/* Common Tailwind text colors */
html.techcenter-android-app.tc-dark .text-gray-900,
html.techcenter-android-app.tc-dark .text-gray-800,
html.techcenter-android-app.tc-dark .text-gray-700,
html.techcenter-android-app.tc-dark .text-gray-600,
html.techcenter-android-app.tc-dark .text-slate-900,
html.techcenter-android-app.tc-dark .text-slate-800,
html.techcenter-android-app.tc-dark .text-slate-700,
html.techcenter-android-app.tc-dark .text-slate-600 {
    color: #e2e8f0 !important;
}

/* Form fields */
html.techcenter-android-app.tc-dark input,
html.techcenter-android-app.tc-dark select,
html.techcenter-android-app.tc-dark textarea {
    background-color: #1e293b !important;
    color: #f8fafc !important;
    border-color: #475569 !important;
}

html.techcenter-android-app.tc-dark input::placeholder,
html.techcenter-android-app.tc-dark textarea::placeholder {
    color: #94a3b8 !important;
}

@media (max-width: 380px) {
    html.techcenter-android-app #android-display-toolbar {
        gap: 4px;
        padding: 7px 5px;
    }

    html.techcenter-android-app .android-tool-button {
        padding: 5px 6px;
        font-size: 11px;
    }

    html.techcenter-android-app #android-zoom-level {
        min-width: 37px;
        font-size: 11px;
    }
}

/* Hide the old Android-injected navigation menus.
   Use the new Django-generated role navigation instead. */

html.techcenter-android-app #tc-fixed-bottom,
html.techcenter-android-app #tc-quick-menu {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}




/* ==========================================
   TECHCENTER ANDROID NAVIGATION
   COMPACT MATERIAL-STYLE DESIGN
========================================== */

/* Compact fixed bottom navigation */
html.techcenter-android-app #techcenter-app-navigation {
    padding: 2px 4px calc(2px + env(safe-area-inset-bottom, 0px)) !important;
    background: #ffffff !important;
    border-top: 1px solid #dbeafe !important;
    box-shadow: 0 -2px 10px rgba(15, 23, 42, .10) !important;
}

/* Five equally spaced navigation items */
html.techcenter-android-app #tc-role-nav-items {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: center;
    gap: 2px;
}

/* Bottom navigation touch targets */
html.techcenter-android-app .tc-role-nav-link,
html.techcenter-android-app .tc-role-nav-settings {
    min-width: 0;
    min-height: 43px !important;
    height: 43px;
    padding: 2px 1px !important;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #2563eb !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    text-decoration: none;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background .12s ease, transform .12s ease;
}

html.techcenter-android-app .tc-role-nav-link:active,
html.techcenter-android-app .tc-role-nav-settings:active {
    background: #dbeafe !important;
    transform: scale(.94);
}

/* Proper SVG icons */
html.techcenter-android-app .tc-role-nav-icon {
    width: 21px;
    height: 21px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    font-size: 20px;
    line-height: 1;
}

html.techcenter-android-app .tc-role-nav-icon svg {
    width: 21px;
    height: 21px;
    display: block;
    stroke: currentColor;
}

/* Bottom labels */
html.techcenter-android-app .tc-role-nav-label {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 9px;
    line-height: 11px;
    font-weight: 700;
    color: #475569;
}

/* Settings popup */
html.techcenter-android-app #tc-role-nav-popup {
    right: 7px;
    bottom: calc(100% + 7px);
    width: min(270px, calc(100vw - 20px));
    max-height: min(62dvh, 460px);
    overflow-y: auto;
    padding: 7px;
    background: #ffffff;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    box-shadow: 0 8px 28px rgba(15, 23, 42, .20);
    overscroll-behavior: contain;
}

/* Every Settings link gets a native-style touch row */
html.techcenter-android-app .tc-role-popup-link {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 48px;
    padding: 6px 9px;
    margin: 2px 0;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: #1e293b;
    text-decoration: none;
    text-align: left;
    font-size: 13px;
    font-weight: 650;
    box-sizing: border-box;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background .12s ease, transform .12s ease;
}

html.techcenter-android-app .tc-role-popup-link:active {
    background: #dbeafe !important;
    transform: scale(.98);
}

/* Icon background in each Settings row */
html.techcenter-android-app .tc-role-popup-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #eff6ff;
    color: #2563eb;
}

html.techcenter-android-app .tc-role-popup-icon svg {
    width: 19px;
    height: 19px;
    display: block;
    stroke: currentColor;
}

/* Settings divider */
html.techcenter-android-app .tc-role-popup-divider {
    height: 1px;
    margin: 6px 5px;
    background: #e2e8f0;
}

/* Logout remains visually distinct */
html.techcenter-android-app .tc-role-popup-link.tc-role-logout {
    margin-top: 5px;
    color: #dc2626 !important;
    background: #fef2f2 !important;
    border: 1px solid #fecaca;
    font-weight: 800;
}

html.techcenter-android-app .tc-role-popup-link.tc-role-logout .tc-role-popup-icon {
    color: #dc2626 !important;
    background: #fee2e2 !important;
}

html.techcenter-android-app .tc-role-popup-link.tc-role-logout:active {
    background: #fee2e2 !important;
}

/* Less space reserved below page content */
html.techcenter-android-app.tc-has-role-nav body {
    padding-bottom: calc(51px + env(safe-area-inset-bottom, 0px)) !important;
}

/* ==========================================
   DARK MODE
========================================== */

html.techcenter-android-app.tc-dark #techcenter-app-navigation {
    background: #111827 !important;
    border-top-color: #334155 !important;
}

html.techcenter-android-app.tc-dark .tc-role-nav-link,
html.techcenter-android-app.tc-dark .tc-role-nav-settings {
    color: #60a5fa !important;
}

html.techcenter-android-app.tc-dark .tc-role-nav-icon {
    color: #60a5fa;
}

html.techcenter-android-app.tc-dark .tc-role-nav-label {
    color: #cbd5e1;
}

html.techcenter-android-app.tc-dark .tc-role-nav-link:active,
html.techcenter-android-app.tc-dark .tc-role-nav-settings:active {
    background: #263449 !important;
}

html.techcenter-android-app.tc-dark #tc-role-nav-popup {
    background: #111827;
    border-color: #334155;
}

html.techcenter-android-app.tc-dark .tc-role-popup-link {
    color: #e2e8f0;
}

html.techcenter-android-app.tc-dark .tc-role-popup-link:active {
    background: #263449 !important;
}

html.techcenter-android-app.tc-dark .tc-role-popup-icon {
    background: #1e3a5f;
    color: #60a5fa;
}

html.techcenter-android-app.tc-dark .tc-role-popup-divider {
    background: #334155;
}

html.techcenter-android-app.tc-dark .tc-role-popup-link.tc-role-logout {
    color: #f87171 !important;
    background: #3b1d27 !important;
    border-color: #7f1d1d;
}

html.techcenter-android-app.tc-dark .tc-role-popup-link.tc-role-logout .tc-role-popup-icon {
    color: #f87171 !important;
    background: #51212e !important;
}

html.techcenter-android-app .tc-role-popup-label {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
    line-height: 1.35;
}

@media (max-width: 360px) {
    html.techcenter-android-app .tc-role-nav-icon,
    html.techcenter-android-app .tc-role-nav-icon svg {
        width: 19px;
        height: 19px;
    }

    html.techcenter-android-app .tc-role-nav-label {
        font-size: 8px;
    }
}

/* New Django-generated bottom navigation */

html.techcenter-android-app #techcenter-app-navigation {
    display: block !important;
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    z-index: 10000 !important;
    box-sizing: border-box !important;
}

/* Settings popup must float above the bottom navigation */

html.techcenter-android-app #tc-role-nav-popup {
    display: none;
    position: absolute !important;
    right: 7px !important;
    bottom: calc(100% + 8px) !important;
    z-index: 10002 !important;
    width: min(280px, calc(100vw - 20px)) !important;
    max-height: 65dvh !important;
    overflow-y: auto !important;
    background: #ffffff !important;
    border: 1px solid #dbeafe !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 28px rgba(15, 23, 42, .22) !important;
    padding: 7px !important;
}

html.techcenter-android-app #tc-role-nav-popup.tc-open {
    display: block !important;
}

/* Make Settings links interactive */

html.techcenter-android-app .tc-role-popup-link {
    position: relative;
    z-index: 1;
    display: flex !important;
    width: 100% !important;
    min-height: 48px;
    align-items: center;
    text-decoration: none !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    -webkit-tap-highlight-color: transparent;
}

/* Dark mode */

html.techcenter-android-app.tc-dark #tc-role-nav-popup {
    background: #111827 !important;
    border-color: #334155 !important;
}

/* ==========================================
   TECHCENTER SETTINGS POPUP - LINK STYLING
========================================== */

html.techcenter-android-app #tc-role-nav-popup .tc-role-popup-link {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    min-height: 49px !important;
    padding: 7px 10px !important;
    margin: 4px 0 !important;

    border: 1px solid #e2e8f0 !important;
    border-radius: 13px !important;

    background: #ffffff !important;
    color: #1e293b !important;

    text-decoration: none !important;
    box-sizing: border-box !important;
    overflow: hidden;

    transition: background .15s ease,
                border-color .15s ease,
                transform .15s ease;
}

/* Pressed state */
html.techcenter-android-app #tc-role-nav-popup .tc-role-popup-link:active {
    background: #eff6ff !important;
    border-color: #93c5fd !important;
    border-radius: 13px !important;
    transform: scale(.98);
}

/* Icon container */
html.techcenter-android-app #tc-role-nav-popup .tc-role-popup-icon {
    width: 35px !important;
    height: 35px !important;
    min-width: 35px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    border-radius: 11px !important;
    background: #eff6ff !important;
    color: #2563eb !important;
}

/* Link text */
html.techcenter-android-app #tc-role-nav-popup .tc-role-popup-label {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}

/* Logout */
html.techcenter-android-app #tc-role-nav-popup .tc-role-logout {
    border: 1px solid #fecaca !important;
    border-radius: 13px !important;
    background: #fef2f2 !important;
    color: #dc2626 !important;
}

html.techcenter-android-app #tc-role-nav-popup .tc-role-logout .tc-role-popup-icon {
    background: #fee2e2 !important;
    color: #dc2626 !important;
}

/* Dark mode */
html.techcenter-android-app.tc-dark #tc-role-nav-popup .tc-role-popup-link {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
    border-radius: 13px !important;
}

html.techcenter-android-app.tc-dark #tc-role-nav-popup .tc-role-popup-icon {
    background: #263449 !important;
    color: #60a5fa !important;
}

html.techcenter-android-app.tc-dark #tc-role-nav-popup .tc-role-popup-link:active {
    background: #263449 !important;
}

html.techcenter-android-app.tc-dark #tc-role-nav-popup .tc-role-logout {
    background: #3b1d27 !important;
    border-color: #7f1d1d !important;
    color: #f87171 !important;
}

html.techcenter-android-app.tc-dark #tc-role-nav-popup .tc-role-logout .tc-role-popup-icon {
    background: #51212e !important;
    color: #f87171 !important;
}

/* ==========================================
   TECHCENTER ANDROID PUSH NOTIFICATION
   CLICKABLE POPUP
========================================== */

/* Hidden by default everywhere */
#tc-push-popup {
    display: none !important;
}

/* Show only inside the Android application */
html.techcenter-android-app #tc-push-popup:not([hidden]) {

    display: flex !important;

    position: fixed !important;

    top: max(12px, env(safe-area-inset-top, 0px)) !important;

    left: 12px !important;

    right: 12px !important;

    width: auto !important;

    z-index: 2147483647 !important;

    box-sizing: border-box !important;

    justify-content: center !important;

    align-items: flex-start !important;

    pointer-events: auto !important;

    visibility: visible !important;

}

/* Popup card */
html.techcenter-android-app .tc-push-popup-card {

    width: 100% !important;

    max-width: 520px !important;

    background: #ffffff !important;

    color: #172033 !important;

    padding: 16px !important;

    border-radius: 14px !important;

    box-shadow: 0 8px 30px rgba(0,0,0,.28) !important;

    border: 1px solid #e5e7eb !important;

    box-sizing: border-box !important;

    pointer-events: auto !important;

    cursor: pointer !important;

}

/* Heading */
html.techcenter-android-app .tc-push-popup-heading {

    display: flex !important;

    justify-content: space-between !important;

    align-items: center !important;

    gap: 10px;

    font-size: 13px;

    font-weight: 700;

    color: #2563eb;

    margin-bottom: 10px;

}

/* Close button */
html.techcenter-android-app #tc-push-popup-close {

    flex-shrink: 0;

    width: 35px;

    height: 35px;

    border: 0;

    border-radius: 50%;

    background: #f1f5f9;

    color: #64748b;

    font-size: 20px;

    cursor: pointer;

    pointer-events: auto !important;

}

/* Title */
html.techcenter-android-app #tc-push-popup-title {

    font-size: 16px;

    font-weight: 800;

    margin-bottom: 7px;

    overflow-wrap: anywhere;

}

/* Complete message */
html.techcenter-android-app #tc-push-popup-message {

    font-size: 14px;

    line-height: 1.6;

    white-space: pre-wrap !important;

    overflow-wrap: anywhere;

    word-break: normal;

}

/* Tap instruction */
html.techcenter-android-app .tc-push-popup-card small {

    display: block;

    margin-top: 12px;

    font-size: 11px;

    color: #64748b;

}

/* Dark mode */
html.techcenter-android-app.tc-dark .tc-push-popup-card {

    background: #1e293b !important;

    color: #f8fafc !important;

    border-color: #475569 !important;

}

html.techcenter-android-app.tc-dark .tc-push-popup-heading {

    color: #60a5fa;

}

html.techcenter-android-app.tc-dark #tc-push-popup-close {

    background: #263449;

    color: #f8fafc;

}

html.techcenter-android-app.tc-dark .tc-push-popup-card small {

    color: #cbd5e1;

}


/* ==========================================
   TECHCENTER ANDROID ALERTS - RESPONSIVE
========================================== */

html.techcenter-android-app #android-notification-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    box-sizing: border-box;
    padding: max(10px, env(safe-area-inset-top))
             10px
             max(10px, env(safe-area-inset-bottom));
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Notification modal */
html.techcenter-android-app
#android-notification-overlay > div {
    width: 100%;
    max-width: 520px;
    max-height: 100%;
    min-height: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Scrollable notification list */
html.techcenter-android-app
#android-notification-list {
    flex: 1 1 auto;
    min-height: 0;
    max-height: min(65dvh, 550px);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

/* Individual alerts */
html.techcenter-android-app
.android-notification-item {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow-wrap: anywhere;
}

/* Full announcement detail */
html.techcenter-android-app
#android-notification-detail {
    flex: 1 1 auto;
    min-height: 0;
    max-height: 75dvh;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* Full announcement text */
html.techcenter-android-app
#android-detail-message {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* In-app Android announcement popup */
html.techcenter-android-app #tc-push-popup {
    box-sizing: border-box;
    width: calc(100% - 20px);
    max-width: 520px;
    max-height: calc(100dvh - 30px);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

/* Long announcement messages */
html.techcenter-android-app
#tc-push-popup-message {
    max-height: 55dvh;
    overflow-y: auto;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Smaller Android screens */
@media (max-width: 480px) {
    html.techcenter-android-app
    #android-notification-overlay {
        padding: 8px;
    }

    html.techcenter-android-app
    #android-notification-overlay > div {
        width: 100%;
        max-height: 100%;
        border-radius: 12px;
    }

    html.techcenter-android-app
    #android-notification-list {
        max-height: 60dvh;
    }

    html.techcenter-android-app
    #android-notification-detail {
        max-height: 75dvh;
    }
}

/* Very short Android screens */
@media (max-height: 550px) {
    html.techcenter-android-app
    #android-notification-overlay {
        align-items: flex-start;
    }

    html.techcenter-android-app
    #android-notification-list {
        max-height: 48dvh;
    }

    html.techcenter-android-app
    #android-notification-detail {
        max-height: 65dvh;
    }
}



/* ==========================================
   FINAL ANDROID NOTIFICATION LAYOUT FIX
   MODAL FIT + INDEPENDENT SCROLLING
========================================== */

/* Keep hidden notification sections genuinely hidden.
   Important because the notification list uses display:flex. */
html.techcenter-android-app #android-notification-list[hidden],
html.techcenter-android-app #android-notification-empty[hidden],
html.techcenter-android-app #android-notification-detail[hidden],
html.techcenter-android-app #android-notification-overlay[hidden] {
    display: none !important;
}

/* Full-screen notification backdrop */
html.techcenter-android-app #android-notification-overlay:not([hidden]) {
    display: flex !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483000 !important;
    padding:
        max(8px, env(safe-area-inset-top))
        8px
        max(8px, env(safe-area-inset-bottom)) !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Notification panel: fixed header/actions, scrollable content */
html.techcenter-android-app #android-notification-panel {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 520px !important;
    height: auto !important;
    max-height: calc(100dvh - 24px) !important;
    min-height: 0 !important;
    padding: 14px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

/* Keep header and action buttons visible */
html.techcenter-android-app .android-notification-header,
html.techcenter-android-app .android-notification-actions {
    flex: 0 0 auto !important;
}

/* Notification history scrolls independently */
html.techcenter-android-app #android-notification-list:not([hidden]) {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    padding-bottom: 4px;
}

/* Empty notification message */
html.techcenter-android-app #android-notification-empty:not([hidden]) {
    display: block !important;
    flex: 0 0 auto !important;
}

/* Full announcement detail scrolls independently */
html.techcenter-android-app #android-notification-detail:not([hidden]) {
    display: block !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    padding: 14px 2px 8px !important;
}

/* Long announcement text */
html.techcenter-android-app #android-detail-message {
    white-space: pre-wrap !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
}

/* Keep notification items inside the panel */
html.techcenter-android-app .android-notification-item {
    flex: 0 0 auto !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

/* Push popup stays inside the screen */
html.techcenter-android-app #tc-push-popup:not([hidden]) {
    display: flex !important;
    position: fixed !important;
    top: max(8px, env(safe-area-inset-top)) !important;
    left: 8px !important;
    right: 8px !important;
    width: auto !important;
    max-height: calc(100dvh - 16px) !important;
    overflow: hidden !important;
    z-index: 2147483647 !important;
    box-sizing: border-box !important;
}

/* Popup card handles long messages */
html.techcenter-android-app #tc-push-popup .tc-push-popup-card {
    width: 100% !important;
    max-width: 520px !important;
    max-height: calc(100dvh - 24px) !important;
    min-height: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
}

/* Only the message area scrolls */
html.techcenter-android-app #tc-push-popup-message {
    max-height: 55dvh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    white-space: pre-wrap !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
}

/* Short Android screens */
@media (max-height: 550px) {
    html.techcenter-android-app #android-notification-panel {
        max-height: calc(100dvh - 12px) !important;
    }

    html.techcenter-android-app #android-detail-message {
        line-height: 1.5 !important;
    }

    html.techcenter-android-app #tc-push-popup-message {
        max-height: 40dvh !important;
    }
}
