/* ======================================================================================
   APOLLO KATEGORI MODAL & DIALOG (apollo-modals.css)
   Description: Spotlight macOS Launchpad, PWA Flyout, Popovers, Dialogs & Minicompose
   ====================================================================================== */

/* ============================================================
   1. CORE BOOTSTRAP MODAL POLISH
   ============================================================ */
.modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    background: #ffffff;
}

.modal-header {
    border-bottom: 1px solid #e2e8f0;
    padding: 18px 24px;
    background: #f8fafc;
}

.modal-footer {
    border-top: 1px solid #e2e8f0;
    padding: 14px 24px;
    background: #f8fafc;
}

/* ============================================================
   2. SPOTLIGHT MAC OS LAUNCHPAD MODAL (Ctrl + K)
   ============================================================ */
#apollo-spotlight-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999999 !important;
    display: none;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding-top: 8vh !important;
    padding-bottom: 5vh !important;
    box-sizing: border-box !important;
    overflow-y: auto !important;
}

#apollo-spotlight-backdrop {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 1 !important;
    background: rgba(11, 17, 32, 0.82) !important;
    backdrop-filter: blur(40px) saturate(190%) !important;
    -webkit-backdrop-filter: blur(40px) saturate(190%) !important;
    cursor: pointer !important;
}

.apollo-launchpad-container {
    position: relative !important;
    z-index: 10 !important;
    width: 1060px !important;
    max-width: 95vw !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

.apollo-launchpad-app {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    text-decoration: none !important;
    color: #ffffff !important;
    cursor: pointer !important;
    user-select: none !important;
    width: 100% !important;
    max-width: 145px !important;
    padding: 10px 6px !important;
    border-radius: 18px !important;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease !important;
}
.apollo-launchpad-app:hover {
    transform: translateY(-6px) scale(1.06) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    text-decoration: none !important;
    color: #ffffff !important;
}

.apollo-app-squircle {
    width: 60px !important;
    height: 60px !important;
    border-radius: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #ffffff !important;
    margin-bottom: 8px !important;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.apollo-launchpad-app:hover .apollo-app-squircle {
    transform: scale(1.1) rotate(2deg) !important;
}

.apollo-app-title {
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    text-align: center !important;
    text-shadow: 0 2px 6px rgba(0,0,0,0.7) !important;
    white-space: nowrap !important;
    letter-spacing: -0.2px !important;
    display: block !important;
}

/* ============================================================
   3. PWA INSTALL FLYOUT & IOS MODAL
   ============================================================ */
.apollo-pwa-flyout-card {
    position: fixed;
    top: 70px;
    right: 24px;
    width: 330px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 20px 45px rgba(0,0,0,0.18);
    z-index: 1060;
    overflow: hidden;
    animation: apolloSlideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.apollo-pwa-flyout-header {
    padding: 14px 18px 8px;
}
.apollo-pwa-flyout-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
}

.apollo-pwa-flyout-body {
    padding: 10px 18px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.apollo-pwa-flyout-icon-wrap img {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    object-fit: contain;
}

.apollo-pwa-flyout-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #0f172a;
}
.apollo-pwa-flyout-domain {
    font-size: 0.76rem;
    color: #64748b;
}

.apollo-pwa-flyout-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 18px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.apollo-pwa-flyout-btn {
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.15s ease;
}
.apollo-pwa-btn-cancel {
    background: #e2e8f0;
    color: #475569;
}
.apollo-pwa-btn-cancel:hover {
    background: #cbd5e1;
}
.apollo-pwa-btn-install {
    background: #2563eb;
    color: #ffffff;
}
.apollo-pwa-btn-install:hover {
    background: #1d4ed8;
}

/* ============================================================
   4. GMAIL STYLE MINICOMPOSE POPUP
   ============================================================ */
#minicompose_container {
    position: fixed !important;
    bottom: 0 !important;
    right: 32px !important;
    width: 540px !important;
    height: 560px !important;
    max-height: 85vh !important;
    background: #ffffff !important;
    border-radius: 16px 16px 0 0 !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25) !important;
    z-index: 9999 !important;
    display: none;
    flex-direction: column !important;
    overflow: hidden !important;
    border: 1px solid #e2e8f0 !important;
    border-bottom: none !important;
}

/* ============================================================
   5. DARK MODE OVERRIDES
   ============================================================ */
html.dark-mode .modal-content,
body.dark-mode .modal-content {
    background-color: #121927 !important;
    color: #f8fafc !important;
}

html.dark-mode .modal-header,
html.dark-mode .modal-footer,
body.dark-mode .modal-header,
body.dark-mode .modal-footer {
    background-color: #182337 !important;
    border-color: #24344d !important;
}

html.dark-mode .apollo-pwa-flyout-card {
    background: #121927;
    border-color: #1f2a3e;
    color: #f8fafc;
}
html.dark-mode .apollo-pwa-flyout-title,
html.dark-mode .apollo-pwa-flyout-name {
    color: #f8fafc;
}
html.dark-mode .apollo-pwa-flyout-footer {
    background: #0f1520;
    border-top-color: #1f2a3e;
}
