/**
 * General Zetpy Call Center styles
 */

/* Custom Scrollbar Styles (Frontend) */
::-webkit-scrollbar {
    width: 15px;
    height: 15px;
}

::-webkit-scrollbar-track {
    background: #f8f9fa;
}

::-webkit-scrollbar-thumb {
    background: #ced4da;
    border-radius: 10px;
    border: 3px solid #f8f9fa;
}

::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
}

/* Firefox Support */
* {
    scrollbar-width: auto;
    scrollbar-color: #ced4da #f8f9fa;
}

:root {
    --primary-color: #007bff;
    --primary-dark: #0056b3;
    --primary-light: #e7f1ff;
    --secondary-color: #6c757d;
    --bg-light: #f8f9fa;
    --text-dark: #212529;
}

html,
body {
    height: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
}

#page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#content {
    flex: 1 0 auto;
}

.site-footer {
    flex-shrink: 0;
}

.x-small {
    font-size: 0.70rem;
}

.custom-select.py-2,
.form-control.py-2,
.form-select.py-2,
.input-group>.custom-select,
.input-group>.form-control,
.input-group>.form-select {
    height: 38px !important;
}

.site-header {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.transform-hover {
    transition: transform 0.2s ease-in-out;
}

.transform-hover:hover {
    transform: translateY(-2px);
}

.cursor-pointer {
    cursor: pointer;
}

.letter-spacing-1 {
    letter-spacing: 1px;
}

/* Home Page Hero Section */
.hero-section {
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(33, 37, 41, 0.8) 0%, rgba(33, 37, 41, 0.45) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal-up {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.reveal-active {
    animation: fadeInUp 0.8s ease-out forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

.icon-box {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border-radius: 50%;
    background-color: var(--primary-light);
    transition: all 0.3s ease;
}

.transform-hover:hover .icon-box {
    background-color: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.transform-hover:hover .icon-box i {
    color: white !important;
}

/* Stable 5-column Dashboard Grid */
.dashboard-navigation {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin: 0 auto;
    max-width: 1200px;
}

.nav-item-wrapper {
    flex: 0 0 calc(20% - 1.5rem);
    min-width: 180px;
}

.nav-card {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background-color: white;
    cursor: pointer;
    text-decoration: none;
}

.nav-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important;
}

/* Tablet & Mobile Grid Adjustments */
@media (max-width: 1200px) {
    .nav-item-wrapper {
        flex: 0 0 calc(33.333% - 1.5rem);
    }
}

@media (max-width: 768px) {
    .nav-item-wrapper {
        flex: 0 0 calc(50% - 1.5rem);
    }
}

@media (max-width: 576px) {
    .nav-item-wrapper {
        flex: 0 0 100%;
    }
}

/* ========================================
   Site Header Nav Link States
   (moved from header.php inline style)
   ======================================== */
.site-header .nav-link:hover {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.1);
}

.site-header .nav-link.active {
    color: #fff !important;
    background-color: transparent;
}

/* ========================================
   Page Container Utilities
   Controls per-page content width/padding.
   The #content div in header.php is bare;
   each page uses one of these wrappers.
   ======================================== */

/* Standard pages (customers, dashboard sub-pages, etc.)
   Centered, max-width, comfortable side padding. */
.page-container-standard {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 2rem 1.5rem;
}

/* Full-width pages (place-order workflow, outlet selection, etc.)
   Edge-to-edge with minimal horizontal padding. */
.page-container-full {
    width: 100%;
    padding: 1rem 1rem 2rem;
}

/* ========================================
   Placeholder Styling
   ======================================== */
::placeholder {
    color: #adb5bd !important;
    opacity: 0.6 !important;
    font-weight: 300;
}

input:focus::placeholder,
textarea:focus::placeholder {
    color: transparent !important;
    opacity: 0 !important;
}


/* Highlight design is now unified in pos-order.css */

.oos-badge {
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 4px;
}

.requirement-met {
    color: #28a745 !important;
}

.oos-product {
    opacity: 0.6;
    filter: grayscale(0.5);
    cursor: not-allowed !important;
}

/* ========================================
   Filter Bar Helper Classes
   ======================================== */
.filter-input-left {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.filter-input-right {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

.filter-btn {
    font-size: 0.85rem !important;
}

.filter-select-prefix {
    width: 80px;
    font-size: 0.8rem;
    padding-left: 5px;
}

.filter-actions-gap {
    gap: 5px !important;
}

/* Ensure consistent height and border for all filter elements */
#dashboard-filter-form .form-control,
#dashboard-filter-form .form-select,
#dashboard-filter-form .input-group-text,
#dashboard-filter-form .filter-btn,
#dashboard-filter-form .input-group .btn {
    height: 38px !important;
    border: 1px solid #dee2e6 !important;
}

#dashboard-filter-form .input-group-text,
#dashboard-filter-form .filter-btn,
#dashboard-filter-form .input-group .btn {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Prevent double borders in input groups */
#dashboard-filter-form .input-group>.form-control:not(:first-child),
#dashboard-filter-form .input-group>.form-select:not(:first-child),
#dashboard-filter-form .input-group>.input-group-text:not(:first-child),
#dashboard-filter-form .input-group>.btn:not(:first-child) {
    border-left: 0 !important;
}

/* Fix for Flatpickr: ensure the visible alt-input has a left border when it's the first visible element */
#dashboard-filter-form .input-group>input[type="hidden"]+.form-control,
#dashboard-filter-form .input-group>.flatpickr-input.form-control {
    border-left: 1px solid #dee2e6 !important;
}


.oos-selection {
    opacity: 0.4;
    cursor: not-allowed !important;
}

/* Alternate Address Styles */
.alternate-address-card {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    transition: all 0.2s ease-in-out;
}

.alternate-address-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    border-color: #dee2e6;
}

.alternate-address-card .address-street {
    font-weight: 600;
    color: #212529;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.alternate-address-card .address-details {
    color: #6c757d;
    font-size: 0.85rem;
}

.alternate-address-card .address-remarks {
    font-size: 0.8rem;
    color: #858f99;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    margin-top: 8px;
    display: inline-block;
}

.alternate-addresses-container {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 5px;
}

.customer-address-col {
    margin-bottom: 15px;
}