/* SEPJI GROUP - Digital Products Marketplace - Custom Styles */

/* Blazor Error UI - Hidden by default */
#blazor-error-ui {
    display: none !important;
    background: #ffffe0;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    left: 0;
    padding: 0.6rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

/* Support for CSS isolation (scoped attributes like b-1pa9md3a0r) */
[id="blazor-error-ui"] {
    display: none !important;
}

/* Show error UI only when html or body has blazor-error-active class */
.blazor-error-active #blazor-error-ui,
.blazor-error-active [id="blazor-error-ui"],
html.blazor-error-active #blazor-error-ui,
body.blazor-error-active #blazor-error-ui {
    display: block !important;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* Global Styles */
html, body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    height: 100%;
}

/* Layout - Sticky Footer */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

main {
    flex: 1 0 auto;
    width: 100%;
}

footer {
    flex-shrink: 0;
    width: 100%;
}

/* Navbar Fixes */
.navbar {
    width: 100%;
}

.navbar > .container {
    display: flex;
    flex-wrap: inherit;
    align-items: center;
    justify-content: space-between;
}

.navbar-collapse {
    flex-basis: 100%;
    flex-grow: 1;
    align-items: center;
}

@media (min-width: 992px) {
    .navbar-expand-lg .navbar-collapse {
        display: flex !important;
        flex-basis: auto;
    }
}

/* Product Card Hover Effect */
.product-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Navbar Sticky */
.navbar.sticky-top {
    z-index: 1030;
}

/* Card Shadow */
.card {
    border: none;
    border-radius: 12px;
}

/* Button Hover Effects */
.btn {
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(25, 135, 84, 0.3);
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

/* Form Controls */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.form-control:focus, .form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* Input Group */
.input-group-text {
    border-radius: 8px 0 0 8px;
    background-color: #f8f9fa;
}

/* Badge Styles */
.badge {
    border-radius: 6px;
    font-weight: 500;
    padding: 0.5em 0.75em;
}

/* Alert Styles */
.alert {
    border-radius: 10px;
    border: none;
}

/* Table Styles */
.table {
    border-radius: 10px;
    overflow: hidden;
}

.table thead th {
    background-color: #f8f9fa;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}

/* Pagination */
.pagination .page-link {
    border-radius: 8px;
    margin: 0 2px;
}

/* Modal */
.modal-content {
    border-radius: 12px;
    border: none;
}

/* Dropdown */
.dropdown-menu {
    border-radius: 10px;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.dropdown-item {
    border-radius: 6px;
    margin: 2px 8px;
    padding: 8px 16px;
    width: auto;
}

.dropdown-item:hover {
    background-color: #e9ecef;
}

/* Carousel */
.carousel-item img {
    border-radius: 12px;
}

/* Footer */
footer {
    margin-top: auto;
}

/* Loading Spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Responsive Typography */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .display-1 {
        font-size: 3rem;
    }
}

/* Mobile Touch Targets */
@media (max-width: 576px) {
    .btn {
        min-height: 44px;
    }
    
    .nav-link {
        padding: 12px 16px;
    }
    
    .form-control, .form-select {
        min-height: 44px;
    }
}

/* Animation for Alerts */
.alert {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Section Gradient */
.bg-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%) !important;
}

/* Card Header Gradient */
.card-header.bg-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%) !important;
}

/* Focus States */
.btn:focus, .form-control:focus, .form-select:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Image Placeholder */
.img-placeholder {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Link Hover */
a {
    transition: color 0.2s ease-in-out;
}

.hover-primary {
    transition: color 0.2s ease-in-out;
}

.hover-primary:hover {
    color: #0d6efd !important;
}

/* ============================================
   BOOTSWATCH BRITE THEME - FORM CONTROLS
   ============================================ */

/* Brite Color Palette */
:root {
    --brite-primary: #2a9fd6;
    --brite-primary-dark: #1d7aa8;
    --brite-secondary: #ff6b9d;
    --brite-success: #77b300;
    --brite-warning: #ff8800;
    --brite-info: #5bc0de;
    --brite-light: #f8f9fa;
    --brite-dark: #212529;
    --brite-pink: #ff6b9d;
    --brite-purple: #9b59b6;
}

/* Brite Input Group */
.brite-input-group .input-group-text {
    background-color: var(--brite-primary);
    border-color: var(--brite-primary);
    color: white;
    font-weight: 600;
    border-radius: 8px 0 0 8px;
    border-width: 2px;
}

/* Brite Form Control */
.form-control-brite {
    border: 2px solid #e9ecef;
    border-radius: 0 8px 8px 0;
    padding: 0.625rem 1rem;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    background-color: #fff;
}

.form-control-brite:focus {
    border-color: var(--brite-primary);
    box-shadow: 0 0 0 0.25rem rgba(42, 159, 214, 0.25);
    background-color: #fff;
}

.form-control-brite::placeholder {
    color: #adb5bd;
    font-weight: 400;
}

/* Brite Select Wrapper */
.brite-select-wrapper {
    position: relative;
}

.brite-select-wrapper .brite-select-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--brite-primary);
    font-size: 0.875rem;
    z-index: 10;
}

/* Brite Form Select */
.form-select-brite {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.625rem 2.5rem 0.625rem 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    background-color: #fff;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.form-select-brite:focus {
    border-color: var(--brite-primary);
    box-shadow: 0 0 0 0.25rem rgba(42, 159, 214, 0.25);
    background-color: #fff;
}

.form-select-brite:hover {
    border-color: var(--brite-primary);
}

/* Brite Button */
.brite-btn {
    background-color: var(--brite-primary);
    border: 2px solid var(--brite-primary);
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 4px 6px rgba(42, 159, 214, 0.3);
}

.brite-btn:hover {
    background-color: var(--brite-primary-dark);
    border-color: var(--brite-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(42, 159, 214, 0.4);
}

.brite-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(42, 159, 214, 0.3);
}

/* Brite Card Style for Filter Section */
.card:has(.brite-input-group) {
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-radius: 12px;
}

.card:has(.brite-input-group) .card-body {
    padding: 1.5rem;
}

/* Breadcrumb */
.breadcrumb {
    background-color: transparent;
    padding: 0;
}

.breadcrumb-item a {
    color: #0d6efd;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

/* Stats Cards */
.card .display-6 {
    opacity: 0.8;
}

/* Table Hover */
.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* Form Check */
.form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* Cursor Pointer */
.cursor-pointer {
    cursor: pointer;
}

/* Text Truncate */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Print Styles */
@media print {
    .navbar, .footer, .btn {
        display: none !important;
    }
    
    .card {
        border: 1px solid #dee2e6;
        box-shadow: none !important;
    }
}
