/* ============================================
   DecodeLabs Intern Portal – Custom Styles
   portal.css  (referenced by offer-letter.html)
   ============================================ */

/* ---------- Bento card base ---------- */
.bento-card {
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 1.25rem;
    transition: border-color 0.35s ease, box-shadow 0.35s ease;
}
.bento-card:hover {
    border-color: rgba(34, 211, 238, 0.18);
    box-shadow: 0 0 30px rgba(34, 211, 238, 0.06);
}

/* ---------- Fullscreen loading overlay ---------- */
.ol-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(2, 6, 23, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.ol-overlay.show {
    opacity: 1;
    visibility: visible;
}
.ol-loading-box {
    text-align: center;
    max-width: 320px;
    padding: 2rem;
}
.ol-overlay-text {
    color: #e2e8f0;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.ol-overlay-percent {
    color: #22d3ee;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
}
.ol-overlay-subtext {
    color: #64748b;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Scan-line animation inside overlay */
.scan-container {
    width: 200px;
    height: 4px;
    background: rgba(34, 211, 238, 0.1);
    border-radius: 999px;
    overflow: hidden;
    margin: 0 auto 1.5rem;
    position: relative;
}
.scan-line {
    position: absolute;
    top: 0;
    left: -40%;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, transparent, #22d3ee, transparent);
    border-radius: 999px;
    animation: scanSlide 1.6s ease-in-out infinite;
}
@keyframes scanSlide {
    0%   { left: -40%; }
    100% { left: 100%; }
}

/* ---------- Inline spinner (button) ---------- */
.spinner {
    display: inline-block;
    width: 1em;
    height: 1em;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spinRotate 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 0.35em;
}
@keyframes spinRotate {
    to { transform: rotate(360deg); }
}

/* ---------- Portal table ---------- */
.portal-table th {
    padding-bottom: 0.75rem;
}
.portal-table td {
    padding: 0.75rem 0.5rem 0.75rem 0;
    color: #e2e8f0;
    font-size: 0.875rem;
}
.portal-table td:last-child {
    text-align: right;
}
.portal-table tbody tr {
    transition: background 0.2s;
}
.portal-table tbody tr:hover {
    background: rgba(148, 163, 184, 0.04);
}

/* ---------- Portal link ---------- */
.portal-link {
    color: #22d3ee;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.8125rem;
    transition: color 0.2s, text-decoration 0.2s;
}
.portal-link:hover {
    color: #06b6d4;
    text-decoration: underline;
}

/* ---------- Portal status badges ---------- */
.portal-status {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    white-space: nowrap;
}
.portal-status.ok {
    color: #34d399;
    background: rgba(52, 211, 153, 0.1);
    border: 1px solid rgba(52, 211, 153, 0.2);
}
.portal-status.pending {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.2);
}
.portal-status.warn {
    color: #f87171;
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.2);
}

/* ---------- Portal list (checkpoints, notes) ---------- */
.portal-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.portal-list-item {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.08);
    border-radius: 0.75rem;
    padding: 0.85rem 1rem;
    transition: border-color 0.25s;
}
.portal-list-item:hover {
    border-color: rgba(34, 211, 238, 0.15);
}
.portal-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.portal-list-title {
    font-weight: 600;
    color: #f1f5f9;
    font-size: 0.875rem;
}
.portal-list-meta {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.15rem;
}
.portal-list-body {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 0.4rem;
    line-height: 1.5;
}
.portal-empty {
    color: #64748b;
    font-size: 0.875rem;
    font-style: italic;
    text-align: center;
    padding: 1.5rem 1rem;
}

/* ---------- Custom scrollbar ---------- */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.2);
    border-radius: 999px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.35);
}

/* ---------- Checkpoints expand (modal overlay on desktop and mobile) ---------- */
.checkpoints-expanded-modal {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 90vw !important;
    max-width: 600px !important;
    max-height: 85vh !important;
    overflow-y: auto !important;
    border-radius: 1.25rem !important;
    box-shadow: 0 0 100px rgba(0, 0, 0, 0.8), 0 0 0 9999px rgba(2, 6, 23, 0.8) !important;
    z-index: 100 !important;
    background: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
}

/* ---------- Truncated text hover tooltip ---------- */
[class*="truncate"][title] {
    cursor: default;
}
.truncate-tooltip {
    position: relative;
}
.truncate-tooltip:hover::after {
    content: attr(title);
    position: absolute;
    left: 0;
    top: 110%;
    z-index: 50;
    background: #1e293b;
    color: #e2e8f0;
    font-size: 0.75rem;
    font-weight: 400;
    padding: 0.4rem 0.65rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(148, 163, 184, 0.15);
    white-space: normal;
    word-break: break-all;
    max-width: 280px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    pointer-events: none;
    animation: tooltipFade 0.15s ease;
}
@keyframes tooltipFade {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Glass card (mobile menu) ---------- */
.glass-card {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(148, 163, 184, 0.1);
}

/* ---------- Mobile menu animations ---------- */
.mobile-menu-panel {
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.mobile-menu-panel.is-open {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Mobile menu hamburger button ---------- */
.mobile-menu-btn {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
}
.hamburger-lines span {
    display: block;
    width: 22px;
    height: 2px;
    background: #e2e8f0;
    border-radius: 2px;
    transition: all 0.3s ease;
}
.mobile-menu-btn.is-open .hamburger-lines span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.mobile-menu-btn.is-open .hamburger-lines span:nth-child(2) {
    opacity: 0;
}
.mobile-menu-btn.is-open .hamburger-lines span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ---------- Brand lockup / wordmark ---------- */
.brand-lockup {
    text-decoration: none;
}
.brand-wordmark {
    letter-spacing: -0.02em;
}

/* ---------- Toast Popup ---------- */
.portal-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(34, 211, 238, 0.4);
    color: #e2e8f0;
    padding: 0.85rem 1.25rem;
    border-radius: 0.75rem;
    font-size: 0.9rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(34, 211, 238, 0.15);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    max-width: 90vw;
}
.portal-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    visibility: visible;
}

