﻿/* =============================================================================
   forces-search-shared.css

   Rules that are byte-identical between
     Modules/Engineering/FileMaker/Components/CornerForcesDBSearch.razor
     Modules/Engineering/FileMaker/Components/FindForcesDBSearch.razor

   Anything that differs between the two components (e.g. .footer-content
   justification, .fixed-header .home-button margin, table layouts, form
   grids) stays inside each component's own <style> block.

   Linked globally in App.razor.
   ============================================================================= */


/* ---------- Fixed header ---------- */

.fixed-header {
    position: fixed;
    top: 60px; /* Adjust this to match your main site header height */
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
    padding: 4px 0;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

/* NOTE: .fixed-header .home-button itself is NOT shared — CornerForces uses
   margin-left: 1.5rem while FindForces uses 1.75rem. The hover/icon rules ARE
   identical, so they live here. */

.fixed-header .home-button:hover {
    background-color: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.fixed-header .home-button i {
    font-size: 14px;
}


/* ---------- Editable dropdown + custom dropdown list ---------- */

.editable-dropdown {
    position: relative;
    width: 100%;
}

    .editable-dropdown input {
        width: 100%;
        box-sizing: border-box;
    }

.custom-dropdown {
    position: absolute;
    max-height: 200px;
    overflow-y: auto;
    background-color: white;
    border: 1px solid #ccc;
    z-index: 1000;
    width: 100%;
    max-width: 100%;
    left: 0;
    right: 0;
    box-sizing: border-box;
}

.dropdown-item {
    padding: 8px 12px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    box-sizing: border-box;
}

    .dropdown-item:hover {
        background-color: #f8f9fa;
    }

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


/* ---------- Search status notification ---------- */

.search-status-notification {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 6px;
    font-size: 14px;
    border: 1px solid #e5e7eb;
}

    .search-status-notification.success {
        background-color: #f0f9ff;
        border-color: #3b82f6;
        color: #1e40af;
    }

        .search-status-notification.success .fas {
            color: #10b981;
        }

    .search-status-notification.warning {
        background-color: #fffbeb;
        border-color: #f59e0b;
        color: #92400e;
    }

        .search-status-notification.warning .fas {
            color: #f59e0b;
        }

    .search-status-notification .fas {
        font-size: 16px;
        flex-shrink: 0;
    }


/* ---------- Verified banner (currentConfig.Verified) ---------- */

.verified-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.9rem;
    border-radius: 6px 6px 0 0;
    border: 1px solid transparent;
    border-bottom: none;
    font-size: 0.85rem;
    margin-bottom: 0;
}

    .verified-banner.verified-verified {
        background-color: #f0fdf4;
        border-color: #86efac;
        color: #166534;
    }

    .verified-banner.verified-unverified {
        background-color: #fffbeb;
        border-color: #fcd34d;
        color: #92400e;
    }

    .verified-banner.verified-incomplete,
    .verified-banner.verified-unknown {
        background-color: #fef2f2;
        border-color: #fca5a5;
        color: #991b1b;
    }

.verified-icon {
    font-size: 1rem;
    line-height: 1;
}

.verified-label {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.8rem;
}

.verified-sub {
    font-size: 0.78rem;
    opacity: 0.75;
    margin-left: auto;
    font-style: italic;
}


/* ---------- Attachment banner ---------- */

.attachment-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.9rem;
    border-radius: 0;
    border: 1px solid transparent;
    border-top: none;
    border-bottom: none;
    font-size: 0.85rem;
    margin-bottom: 0;
}

    .attachment-banner.attachment-has {
        background-color: #eff6ff;
        border-color: #93c5fd;
        color: #1e40af;
    }

    .attachment-banner.attachment-none {
        background-color: #f9fafb;
        border-color: #d1d5db;
        color: #4b5563;
    }

    .attachment-banner.attachment-loading {
        background-color: #fefce8;
        border-color: #fde047;
        color: #854d0e;
    }

.attachment-icon {
    font-size: 1rem;
    line-height: 1;
}

.attachment-label {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.8rem;
}

.attachment-sub {
    font-size: 0.78rem;
    opacity: 0.75;
    margin-left: auto;
    font-style: italic;
}


/* ---------- Fixed action footer ---------- */

/* NOTE: .footer-content itself is NOT shared — CornerForces centers its
   contents (justify-content: center) while FindForces spreads them
   (space-between). Same story for .footer-pagination's background color
   (#fcf5f4 vs #f9f5f5 family). Both live in each component's own <style>. */

.fixed-action-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid #f2d4d1;
    box-shadow: 0 -2px 10px rgba(231, 76, 60, 0.1);
    z-index: 1000;
    padding: 12px 0;
}

.pagination-info {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
    white-space: nowrap;
    margin: 0;
}

.pagination-controls {
    display: flex;
    gap: 4px;
    align-items: center;
}

    .pagination-controls .btn {
        min-height: 32px;
        min-width: 32px;
        padding: 6px !important;
        font-size: 14px !important;
        border: 1px solid #f2d4d1;
        background-color: white;
        color: #c0392b;
        border-radius: 4px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
    }

        .pagination-controls .btn:hover:not(:disabled) {
            background-color: #fde9e7;
            border-color: #e8c5c0;
            color: #a63529;
        }

        .pagination-controls .btn:disabled {
            background-color: #f9fafb;
            border-color: #e5e7eb;
            color: #d1d5db;
            cursor: not-allowed;
        }


/* ---------- Footer action buttons ---------- */

.footer-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

    .footer-buttons .btn {
        min-height: 40px;
        padding: 8px 16px;
        font-weight: 500;
        border-radius: 6px;
        display: flex;
        align-items: center;
        gap: 6px;
        white-space: nowrap;
        transition: all 0.2s ease;
    }

        .footer-buttons .btn i {
            font-size: 14px;
        }

    .footer-buttons .btn-primary {
        background-color: #e74c3c;
        color: white;
        border: 1px solid #c0392b;
    }

        .footer-buttons .btn-primary:hover {
            background-color: #c0392b;
            box-shadow: 0 2px 5px rgba(231, 76, 60, 0.2);
        }


/* ---------- Footer message ---------- */

.footer-message {
    background-color: white;
    padding: 1.5rem;
    border-radius: 6px;
    border: 1px solid #f2d4d1;
    box-shadow: 0 1px 3px rgba(231, 76, 60, 0.1);
    margin-top: 2rem;
    text-align: center;
}

    .footer-message .section-header {
        background: linear-gradient(90deg, #fcf5f4 0%, #f9e6e4 100%);
        padding: 0.75rem 1rem;
        border-left: 4px solid #e74c3c;
        border-radius: 4px;
        margin-bottom: 1rem;
    }

.message-content p {
    margin: 0;
    font-size: 1.1rem;
    color: #2d3748;
    font-weight: 500;
    font-style: italic;
    letter-spacing: 0.5px;
}


/* ---------- Responsive: footer behaviour on small screens ---------- */

@media (max-width: 992px) {
    .footer-pagination {
        order: 1;
        width: 100%;
        justify-content: center;
    }

    .footer-buttons {
        order: 2;
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .footer-buttons {
        flex-direction: column;
        gap: 8px;
    }

        .footer-buttons .btn {
            width: 100%;
            justify-content: center;
            max-width: 300px;
        }
}
