@import "tailwindcss";
@import "./chat-widget.css";
@import "./dark.css";
@import "./afghan-theme.css";

@source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php';
@source '../../storage/framework/views/*.php';
@source '../**/*.blade.php';
@source '../**/*.js';
@source '../**/*.jsx';

@theme {
    --font-sans:
        "Instrument Sans", ui-sans-serif, system-ui, sans-serif,
        "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
        "Noto Color Emoji";
}

/* Vazir Persian font (downloaded into `public/fonts/vazir`) */
@font-face {
    font-family: "Vazir";
    src:
        url("/fonts/vazir/Vazir-Regular.woff2") format("woff2"),
        url("/fonts/vazir/Vazir-Regular.woff") format("woff"),
        url("/fonts/vazir/Vazir-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Vazir";
    src:
        url("/fonts/vazir/Vazir-Bold.woff2") format("woff2"),
        url("/fonts/vazir/Vazir-Bold.woff") format("woff"),
        url("/fonts/vazir/Vazir-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
/* About ADA branding colors */
/* primary-color: #1c2021 */
/* secondary-color: #0d2143 */
/* accent-color: #4895fd */

/* Website design tokens & shared styles */
:root {
    --site-primary: #1c2021;
    --site-secondary: #4895fd;
    --site-secondary-dark: #000833;
    --site-primary-light: #102544;
    --site-primary-lighter: #f3f3f3;
    --site-primary-dark: #1c2021;
    --site-accent: #4895fd;
    --site-bg: #ffffff;
    /* Soft background for sections like "Shop by Categories" */
    --site-section-bg-light: #f5faff;
    --site-section-bg-dark: #020617;
    --site-section-bg: var(--site-section-bg-light);
    --site-card-radius: 1rem;
    --site-card-shadow: 0 12px 28px rgba(15, 23, 42, 0.15);
}

/* Dark mode overrides */
[data-theme="dark"] {
    color-scheme: dark;
    --site-primary: #1c2021; /* sky-400 */
    --site-primary-light: #00222b;
    --site-primary-dark: #0d2143;
    --site-secondary: #4895fd;
    --site-accent: #4895fd;
    --site-bg: #020617; /* slate-950 */
}

body {
    background-color: var(--site-bg);
}

/* Apply Vazirmatn when document direction is RTL (Dari / Persian / Pashto)
   This preserves the existing font stack for LTR languages. */
[dir="rtl"] {
    --font-sans:
        "Vazir", "Instrument Sans", ui-sans-serif, system-ui, sans-serif,
        "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
        "Noto Color Emoji";
}

/* Ensure body uses the theme font variable */
body {
    font-family: var(--font-sans);
}

/* Print-only styles for storefront order receipt */
@media print {
    body {
        background: #ffffff !important;
    }

    /* Hide everything by default */
    body * {
        visibility: hidden;
    }

    /* Only show the receipt card */
    .print-bill,
    .print-bill * {
        visibility: visible;
    }

    .print-bill {
        position: absolute;
        inset: 0;
        margin: 0;
        padding: 24px;
        box-shadow: none;
        border-radius: 0;
        border: none;
    }

    /* Hide global layout elements explicitly */
    header,
    footer,
    nav,
    .dashboard-main-body,
    .checkout-roadmap {
        display: none !important;
    }

    /* Hide the print button itself in print view */
    .print-bill button {
        display: none !important;
    }
}

.category-scroll-btn {
    color: var(--site-primary);
}
.category-scroll-btn:hover {
    color: var(--site-primary-dark);
}
.website-card {
    border-radius: var(--site-card-radius);
    /* box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06); */
    transition: transform 0.2s ease;
}

.website-card:hover {
    transform: translateY(-2px);
}

.website-btn-primary {
    background-color: var(--site-primary);
    color: #ffffff;
    border-radius: 9999px;
    padding: 0.4rem 0.9rem;
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    transition:
        background-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.15s ease;
}

.website-btn-primary:hover {
    background-color: var(--site-primary-dark);
    transform: translateY(-1px);
}
.shop-by-category-container {
    /* Container styles for shop by category section - to be implemented */
}

.shop-by-category-button {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow:
        rgba(0, 0, 0, 0.1) 3px 3px 7px,
        rgba(255, 255, 255, 0.4) 0px 1px 0px inset;
}
.shop-by-category-button:hover {
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow:
        rgba(0, 0, 0, 0.15) 4px 4px 10px,
        rgba(255, 255, 255, 0.5) 0px 1px 0px inset;
}

.deals-of-the-day-con {
    background: linear-gradient(var(--site-primary-lighter), #fafafa);
    color: var(--site-primary-dark);
    box-shadow: 0px 0px 1px 0px #020617;
}
[data-theme="dark"] .deals-of-the-day-con {
    background: linear-gradient(var(--site-section-bg-dark), #020617);
    color: var(--site-primary-light);
    box-shadow: var(--site-card-shadow);
}

.second-header {
    box-shadow: 1px 11px 11px -17px black;
}

.view-today-offer {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow:
        rgba(0, 0, 0, 0.1) 2px 0px 11px,
        rgba(255, 255, 255, 0.4) 0px 1px 0px inset;
}
.mobile-menu-item {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow:
        rgba(0, 0, 0, 0.1) 2px 0px 11px,
        rgba(255, 255, 255, 0.4) 0px 1px 0px inset;
}
.shop-by-category-icon {
    color: var(--site-primary);
}

[data-theme="dark"] {
    .shop-by-category-icon {
        color: var(--site-secondary);
    }
}

.website-badge {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    background-color: rgba(15, 23, 42, 0.04);
    color: #0f172a;
}

.skeleton {
    position: relative;
    overflow: hidden;
    /* Light mode uses design tokens from settings */
    background-color: var(--site-section-bg-light);
    background-image: linear-gradient(
        90deg,
        var(--site-section-bg-light) 0px,
        var(--site-bg) 40px,
        var(--site-section-bg-light) 80px
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.4s ease-in-out infinite;
    border-radius: inherit;
}

@keyframes skeleton-loading {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

/* Override Bootstrap's table-responsive so it doesn't add
   an inner vertical scrollbar; let the page scroll instead. */
.table-responsive {
    overflow-y: hidden;
}

/* Website toast notifications themed with primary color */
.Toastify__toast--success {
    background: var(--site-primary) !important;
    color: #ffffff !important;
}

.Toastify__toast--info {
    background: var(--site-primary-light) !important;
    color: #ffffff !important;
}

.Toastify__toast--error {
    background: var(--site-accent) !important;
    color: #ffffff !important;
}

.Toastify__progress-bar {
    background: rgba(255, 255, 255, 0.8) !important;
}

/* RTL fix: ensure toast container doesn't get extra right margin on small screens */
[dir="rtl"] .Toastify__toast-container--top-right,
[dir="rtl"] .Toastify__toast-container--bottom-right {
    right: 0.5rem !important;
    left: auto !important;
}

@media (max-width: 640px) {
    /* on mobile keep small horizontal padding for toasts in RTL */
    [dir="rtl"] .Toastify__toast-container--top-right,
    [dir="rtl"] .Toastify__toast-container--bottom-right {
        right: 0.5rem !important;
    }
}

/* Hide scrollbars for custom horizontal scrollers (e.g., shop categories) */
.no-scrollbar {
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}

.no-scrollbar::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}
.shop-page-sidebar-container {
    border-color: #f5faff;
}

/*  */
@media screen {
    .stay-home-input-container {
        display: flex;
    }
}

/* Default (LTR) */
.stay-home-input {
    border-radius: 30px 0 0 30px;
}

.stay-home-button {
    border-radius: 0 30px 30px 0;
}

/* RTL override */
[dir="rtl"] .stay-home-input {
    border-radius: 0 30px 30px 0;
}

[dir="rtl"] .stay-home-button {
    border-radius: 30px 0 0 30px;
}

/* Quill Editor Styles for Footer Content */
.quill-wrapper .ql-toolbar {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    border-bottom: none;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
}
.footer-border {
    border-top: 3px solid var(--site-primary);
    border-radius: 100px;
}

.quill-wrapper .ql-container {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    border-top: none;
    min-height: 120px;
    border: 1px solid #dee2e6;
    border-top: none;
}

.quill-wrapper .ql-editor {
    font-size: 14px;
    line-height: 1.5;
    padding: 12px 15px;
}

.quill-wrapper .ql-editor.ql-blank::before {
    color: #6c757d;
    font-style: normal;
}

.quill-wrapper .ql-toolbar .ql-picker-label {
    color: #495057;
}

.quill-wrapper .ql-toolbar button {
    padding: 4px 8px;
    margin: 0 1px;
}

.quill-wrapper .ql-toolbar button:hover {
    background-color: #e9ecef;
}

.quill-wrapper .ql-toolbar .ql-active {
    background-color: var(--site-primary);
    color: white;
}

.quill-wrapper .ql-toolbar .ql-active:hover {
    background-color: var(--site-primary-dark);
}
.mobile-menu-items {
    display: flex;
    flex-direction: column;
    text-align: start;
}

/* Chat delete button styles */
.chat-sidebar-single-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-sidebar-single-wrapper .chat-sidebar-single {
    flex: 1;
    text-align: left;
}

.delete-chat-btn {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.delete-chat-btn:hover {
    opacity: 1;
    transform: scale(1.05);
}

.delete-chat-btn:active {
    transform: scale(0.95);
}

/* RTL support */
[dir="rtl"] .chat-sidebar-single-wrapper .chat-sidebar-single {
    text-align: right;
}
