/**
 * Antigravity B2B Modules Isolated Stylesheet
 * Strictly scoped to B2B archives, jobs board, and enterprise catalog.
 */

/* Theme Variables Fallback */
:root {
    --ag-font-primary: 'Cormorant Garamond', Georgia, serif;
    --ag-brand-orange: #D76314;
    --ag-brand-orange-hover: #b54f0d;
    --ag-bg-sand: #F4F2EA;
}

/* Highlight matching search terms */
mark.ag-highlight {
    background: rgba(215, 99, 20, 0.2) !important;
    color: #111111 !important;
    padding: 1px 4px !important;
    border-radius: 3px !important;
    font-weight: 600 !important;
}

/* Toast Notifications */
.ag-b2b-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(215, 99, 20, 0.3);
    border-radius: 8px;
    padding: 14px 22px;
    font-family: var(--ag-font-primary), Georgia, serif;
    font-size: 16px;
    color: #1a1a1a;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    z-index: 999999;
    transform: translateY(100px);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.3s ease;
    pointer-events: none;
}
.ag-b2b-toast.show {
    transform: translateY(0);
    opacity: 1;
}
.ag-b2b-toast.success {
    border-left: 4px solid #10b981;
}
.ag-b2b-toast.error {
    border-left: 4px solid #ef4444;
}

/* Skeleton Loading Animation */
@keyframes ag-pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* Portfolio Lightbox Overlay */
.ag-b2b-lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 999990;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}
.ag-b2b-lightbox-overlay.active {
    display: flex;
}
.ag-b2b-lightbox-content {
    position: relative;
    max-width: 900px;
    width: 100%;
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(215, 99, 20, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
}
.ag-lightbox-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}
.ag-lightbox-close:hover {
    color: var(--ag-brand-orange, #D76314);
}
.ag-lightbox-img-wrap {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #f4f2ea;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ag-lightbox-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.ag-lightbox-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 16px;
    font-family: var(--ag-font-primary), Georgia, serif;
    font-size: 16px;
    font-weight: 600;
}
.ag-lightbox-controls button {
    background: rgba(215, 99, 20, 0.1);
    color: var(--ag-brand-orange, #D76314);
    border: 1px solid rgba(215, 99, 20, 0.2);
    border-radius: 6px;
    min-width: 44px;
    height: 44px;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}
.ag-lightbox-controls button:hover {
    background: var(--ag-brand-orange, #D76314);
    color: #ffffff;
}

/* Bookmark Button Styling */
.js-ag-bookmark {
    background: none;
    border: none;
    cursor: pointer;
    color: #a0aec0;
    transition: color 0.2s ease, transform 0.2s ease;
    padding: 8px;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.js-ag-bookmark:hover {
    color: var(--ag-brand-orange, #D76314);
    transform: scale(1.1);
}
.js-ag-bookmark.is-bookmarked {
    color: var(--ag-brand-orange, #D76314) !important;
}
.js-ag-bookmark.animating {
    animation: ag-pulse 0.6s ease infinite;
}

/* Touch targets enforcement for B2B controls */
.jobs-board-body button,
.ag-archive-layout-container button,
.ag-search-body button {
    min-height: 44px;
}
