﻿/* Inspired Modern Color Palette   #141014 */
:root {
    --primary-color: #141014;
    --primary-dark: #0052CC;
    --secondary-color: #00D9FF;
    --accent-color: #00B8D4;
    --success-color: #00C853;
    --warning-color: #FFB300;
    --dark-color: #1A1A1A;
    --light-color: #F5F7FA;
    --white: #FFFFFF;
    --for-soft-eyes-color: #00000056;
    --error-color: #ff3333;
    --ai-dark: #0f172a;
}

/* Fonts for all components*/

@font-face {
    font-family: 'Tajawal';
    src: url('/fonts/Tajawal-Regular.ttf') format('truetype');
}

/* Apply Tajawal font globally */
* {
    font-family: 'Tajawal', sans-serif;
}

/* Global Styles */
body {
    /*font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;*/
    /* font-family: 'Tajawal', sans-serif; */
    color: var(--dark-color);
    background-color: var(--light-color);
}

/* Bootstrap Override - Zero Border Radius */
.card,
.btn,
.form-control,
.form-select,
.input-group-text,
.badge,
.alert,
.offcanvas,
.navbar,
img {
    border-radius: 0 !important;
}

/* Custom Primary Color */
.bg-primary {
    background-color: var(--primary-color) !important;
}

.btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color);
}

    .btn-primary:hover,
    .btn-primary:focus {
        background-color: var(--primary-dark);
        border-color: var(--primary-dark);
    }

.text-primary {
    color: var(--primary-color) !important;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

    .btn-outline-primary:hover {
        background-color: var(--primary-color);
        border-color: var(--primary-color);
    }

/* Advertising Banner */
.ad-banner {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    min-height: 100px;
    width: 100%;
}

/* Item Cards */
.item-card {
    border: 1px solid #E0E0E0;
    transition: all 0.3s ease;

   position: relative;
    overflow: hidden; /* To ensure that the image doesn't spill over */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Add a subtle shadow to the card itself */
}

    .item-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    }

    .item-card img {
        width: 100%;
        height: 250px;
        object-fit: cover;
    }

/* Mobile-first responsive images */
@media (max-width: 576px) {
    .item-card img {
        height: 200px;
    }
}

/* Navbar */
.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, var(--ai-dark) 0%, var(--ai-dark) 100%);
}
/* Navbar */
.app-navbar {
    padding-top: .25rem;
    padding-bottom: .25rem;
}

    .app-navbar .navbar-brand {
        font-size: 1.25rem;
        letter-spacing: .5px;
        color: #fff;
    }

    .app-navbar .nav-link {
        color: rgba(255, 255, 255, .75);
        padding: .6rem .9rem;
        border-bottom: 2px solid transparent;
        transition: color .2s, border-color .2s;
    }

        .app-navbar .nav-link:hover {
            color: #fff;
        }

        .app-navbar .nav-link.active {
            color: #fff;
            border-bottom-color: #d4af37;
        }

    .app-navbar .nav-user-name {
        color: rgba(255, 255, 255, .85);
        font-size: .9rem;
    }

@media (max-width: 991.98px) {
    .app-navbar .navbar-collapse {
        padding: .5rem 0 1rem;
    }

    .app-navbar .nav-user {
        padding-top: .75rem;
        border-top: 1px solid rgba(255, 255, 255, .15);
        justify-content: space-between;
    }
}

.brand-text {
    display: inline-flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-name {
    font-size: 1.15rem;
    letter-spacing: 1px;
}

.brand-tagline {
    font-size: .8rem;
    font-weight: 600;
    color: #d4af37;
}

.footer-tagline {
    color: #b8912b;
}

/* Moving progress line under the navbar */
.nav-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    overflow: hidden;
    opacity: 0;
    transition: opacity .2s;
    pointer-events: none;
}

.nav-progress-fixed {
    position: fixed;
    top: 0;
    bottom: auto;
    z-index: 10000;
}

.nav-progress.active {
    opacity: 1;
}

.nav-progress span {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 35%;
    background: linear-gradient(90deg, transparent, #d4af37, transparent);
    animation: nav-progress-move 1.1s ease-in-out infinite;
}

@keyframes nav-progress-move {
    from { left: -35%; }
    to { left: 100%; }
}

/* The logo image has large transparent margins; crop to the artwork so it is legible */
.brand-logo {
    display: inline-block;
    width: 56px;
    height: 52px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

    .brand-logo img {
        position: absolute;
        width: 114px;
        height: auto;
        top: -12px;
        left: -38px;
        max-width: none;
    }

/* Listing form */
.form-section {
    border: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

    .form-section .card-header {
        background: #fff;
        border-bottom: 1px solid #eee;
        padding: 1rem 1.25rem;
    }

.photo-slot {
    border: 2px dashed #ced4da;
    background: #fafbfc;
    padding: 1rem;
    text-align: center;
    height: 100%;
    transition: border-color .2s, background .2s;
}

    .photo-slot:hover {
        border-color: var(--accent-color);
        background: #fff;
    }

    .photo-slot .photo-preview-wrap {
        height: 160px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #adb5bd;
        font-size: 2.5rem;
        margin-bottom: .75rem;
        overflow: hidden;
    }

    .photo-slot img.photo-preview {
        width: 100%;
        height: 160px;
        object-fit: cover;
    }

.form-actions {
    position: sticky;
    bottom: 70px;
    z-index: 10;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
}

/* jQuery validation states (tag-helper forms) */
.input-validation-error {
    border-color: #dc3545 !important;
}

.field-validation-error {
    display: block;
    margin-top: .25rem;
    color: #dc3545;
    font-size: .875rem;
}

.validation-summary-errors ul {
    margin-bottom: 0;
    padding-inline-start: 1.25rem;
}

/* Footer */
footer {
    margin-top: auto;
}

.app-footer {
    border-top: 1px solid #e5e7eb;
    background: #fff;
    margin-top: 2rem;
}

    .app-footer a {
        color: var(--primary-color);
    }

        .app-footer a:hover {
            color: #b8912b;
        }

/* Login / register marketplace hero */
.auth-hero {
    background: linear-gradient(135deg, var(--ai-dark) 0%, #1e293b 100%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
    border-bottom: 4px solid #d4af37;
}

.brand-logo-lg {
    width: 120px;
    height: 104px;
    overflow: hidden;
    position: relative;
}

    .brand-logo-lg img {
        position: absolute;
        width: 228px;
        height: auto;
        top: -24px;
        left: -76px;
        max-width: none;
    }

.auth-chip {
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .2);
    padding: .3rem .7rem;
    font-size: .85rem;
}

    .auth-chip i {
        margin-inline-end: .35rem;
        color: #d4af37;
    }

.auth-icon {
    color: #d4af37;
    font-size: 1.25rem;
    margin-inline-end: .75rem;
}

/* Reserve space so the fixed-bottom mobile nav doesn't cover page content */
.has-bottom-nav {
    padding-bottom: calc(70px + env(safe-area-inset-bottom));
}

/* Error Messages */
.error-message {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 5px;
    min-height: 20px;
    font-weight: 500;
}


/* RTL Support */
[dir="rtl"] {
    text-align: right;
}

    [dir="rtl"] .navbar-nav {
        margin-left: 0;
        margin-right: auto;
    }

    [dir="rtl"] .input-group-text {
        border-left: 0;
        border-right: 1px solid #ced4da;
    }

    [dir="rtl"] .form-check {
        padding-right: 1.5em;
        padding-left: 0;
    }

        /* Bootstrap floats the input to the left of the padding; in RTL it must sit on the right */
        [dir="rtl"] .form-check .form-check-input {
            float: right;
            margin-right: -1.5em;
            margin-left: 0;
        }

.form-check-input {
    cursor: pointer;
}

    .form-check-input:checked {
        background-color: var(--primary-color);
        border-color: var(--primary-color);
    }

.form-check-label {
    cursor: pointer;
    user-select: none;
}

    [dir="rtl"] .badge {
        margin-left: 0;
        margin-right: 0.5rem;
    }

/* Authentication Pages */
.min-vh-100 {
    min-height: 100vh;
}

/* Chat Styling */
.card-body::-webkit-scrollbar {
    width: 8px;
}

.card-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.card-body::-webkit-scrollbar-thumb {
    background: var(--primary-color);
}

    .card-body::-webkit-scrollbar-thumb:hover {
        background: var(--primary-dark);
    }

/* Success Color */
.bg-success {
    background-color: var(--success-color) !important;
}

.text-success {
    color: var(--success-color) !important;
}

/* Warning Color */
.bg-warning {
    background-color: var(--warning-color) !important;
}

/* Utilities */
.shadow-lg {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15) !important;
}

/* Responsive Typography */
@media (max-width: 768px) {
    h1, .h1 {
        font-size: 1.75rem;
    }

    h2, .h2 {
        font-size: 1.5rem;
    }

    h3, .h3 {
        font-size: 1.25rem;
    }
}

/* Button Hover Effects */
.btn {
    transition: all 0.3s ease;
}

    .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    }

/* Input Focus */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 255, 0.25);
}

/* Link Styles */
a {
    transition: all 0.2s ease;
}

    a:hover {
        opacity: 0.8;
    }
