/* Updated style.css with Laxapana color themes */

/* Root variables matching header styles */
:root {
    --laxapana-yellow: #a3acec;
    --laxapana-black: #1f2766;
    --laxapana-dark-gray: #303b90;
    --laxapana-light-gray: #f3f4fc;
    --laxapana-hover: #c9cef5;
    --laxapana-red: #303b90;
    --laxapana-danger: #dc3545;
}

/* Custom styles for rows */
.green-row {
    background-color: #d4edda;
}

.red-row {
    background-color: #f8d7da;
}

/* Button styles updated with new theme */
.btnex {
    color: #fff;
    background-color: var(--laxapana-red);
    border-color: var(--laxapana-red);
    transition: all 0.3s ease;
}

.btnex:hover {
    background-color: #1f2766;
    border-color: #1f2766;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(172, 7, 7, 0.3);
}

/* Loader with theme colors */
.loader {
    width: 32px;
    height: 32px;
    position: relative;
    border-radius: 50%;
    color: var(--laxapana-red);
    animation: fill 1s ease-in infinite alternate;
}

.loader::before,
.loader::after {
    content: '';
    position: absolute;
    height: 100%;
    width: 100%;
    border-radius: 50%;
    left: 48px;
    top: 0;
    animation: fill 0.9s ease-in infinite alternate;
}

.loader::after {
    left: auto;
    right: 48px;
    animation-duration: 0.5s;
}

@keyframes fill {
    0% {
        box-shadow: 0 0 0 2px inset;
    }

    100% {
        box-shadow: 0 0 0 10px inset;
    }
}

/* Center the spinner container */
#pleaseWaitMessage {
    position: relative;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Table Styles with theme */
#tableWrapper {
    max-height: 750px;
    overflow-y: auto;
    border: 2px solid var(--laxapana-yellow);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Sticky header with theme colors */
thead th {
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, var(--laxapana-black) 0%, var(--laxapana-dark-gray) 100%);
    color: #ffffff;
    font-weight: 600;
    border-bottom: 2px solid var(--laxapana-yellow);
    z-index: 1;
    padding: 12px 15px;
}

/* Table cell alignment */
.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left !important;
}

/* Align all table cell text to the right by default */
#productTable td {
    text-align: right;
    padding: 8px 15px;
    border-bottom: 1px solid var(--laxapana-light-gray);
}

/* Exclude the first two columns */
#productTable td:nth-child(1),
#productTable td:nth-child(2) {
    text-align: left;
}

/* Text color styles */
.text-color {
    color: var(--laxapana-red);
    font-weight: 600;
    transition: all 0.3s ease-in-out;
}

.text-color:hover {
    color: var(--laxapana-yellow);
    font-weight: 700;
}

/* Dropdown menu updates */
.dropdown-menu {
    background-color: #ffffff;
    border: 2px solid var(--laxapana-yellow);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.dropdown-menu .dropdown-item {
    color: var(--laxapana-black);
    font-weight: 500;
    transition: all 0.2s ease;
    font-size: 14px;
    padding: 8px 16px;
}

.dropdown-menu .dropdown-item:hover {
    background-color: var(--laxapana-yellow);
    color: var(--laxapana-black);
    padding-left: 20px;
}

/* Navigation styles */
.nav-link {
    margin-right: 18px;
    font-size: 14px;
    font-weight: 600;
    color: var(--laxapana-black);
    transition: all 0.3s ease;
}

.nav-item:hover {
    text-decoration: underline;
    text-decoration-color: var(--laxapana-yellow);
}

.name:hover {
    text-decoration: none;
}

/* Footer styling */
footer {
    margin-top: 75vh;
    background: linear-gradient(135deg, var(--laxapana-light-gray) 0%, #ffffff 100%);
    text-align: center;
    padding: 20px 0;
    border-top: 2px solid var(--laxapana-yellow);
    color: var(--laxapana-black);
}

/* Search inputs */
.search {
    align-items: right;
    text-align: right;
    margin-bottom: 5px;
}

#tableSearchInput,
#searchInput {
    border-radius: 5px;
    border: 2px solid var(--laxapana-yellow);
    padding: 8px 12px;
    transition: all 0.3s ease;
    background-color: var(--laxapana-light-gray);
}

#tableSearchInput:focus,
#searchInput:focus {
    outline: none;
    border-color: var(--laxapana-black);
    box-shadow: 0 0 0 3px rgba(163, 172, 236, 0.3);
}

/* Spacing utilities */
.mr {
    margin-right: 50px;
}

/* Warning text */
.text-warning {
    color: var(--laxapana-yellow) !important;
}

/* Filter dropdowns */
#routeFilter,
#catFilter,
#repFilter {
    color: var(--laxapana-black);
    background-color: var(--laxapana-light-gray);
    border: 2px solid var(--laxapana-yellow);
    border-radius: 5px;
    padding: 6px 12px;
    margin-top: 8px;
    transition: all 0.3s ease;
    outline: none;
}

#routeFilter:focus,
#catFilter:focus,
#repFilter:focus {
    color: var(--laxapana-black);
    background-color: #ffffff;
    border-color: var(--laxapana-black);
    box-shadow: 0 0 0 3px rgba(163, 172, 236, 0.3);
}

#routeFilter:hover,
#catFilter:hover,
#repFilter:hover {
    background-color: var(--laxapana-yellow);
}

/* Table width utility */
.dtw {
    width: auto;
}

/* Footer table styling */
.fot {
    position: sticky;
    inset-block-end: 0;
    background: linear-gradient(135deg, var(--laxapana-light-gray) 0%, #ffffff 100%);
    z-index: 15;
    border-top: 2px solid var(--laxapana-yellow);
}

/* Sticky columns for tables */
.sticky,
.sticky1,
.sticky2,
.sticky3,
.sticky4 {
    position: sticky;
    top: 0;
    z-index: 10;
    background: linear-gradient(135deg, var(--laxapana-black) 0%, var(--laxapana-dark-gray) 100%);
    color: #ffffff;
    border-bottom: 2px solid var(--laxapana-yellow);
}

.sticky {
    left: 0px;
}

.sticky1 {
    left: 50px;
}

.sticky2 {
    left: 150px;
}

.sticky3 {
    left: 280px;
}

.sticky4 {
    left: 480px;
}

/* Text alignment */
.text-left {
    text-align: left;
    align-items: left;
}

/* Background utilities */
.cor {
    background-color: #fff;
}

.bz {
    top: 75px;
}

/* Table row hover effect */
#productTable tbody tr:hover {
    background-color: rgba(163, 172, 236, 0.1);
    transition: background-color 0.3s ease;
}

/* Custom scrollbar matching theme */
#tableWrapper::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

#tableWrapper::-webkit-scrollbar-track {
    background: var(--laxapana-light-gray);
    border-radius: 4px;
}

#tableWrapper::-webkit-scrollbar-thumb {
    background: var(--laxapana-yellow);
    border-radius: 4px;
}

#tableWrapper::-webkit-scrollbar-thumb:hover {
    background: var(--laxapana-hover);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .nav-link {
        margin-right: 10px;
        font-size: 12px;
    }
    
    .sticky,
    .sticky1,
    .sticky2,
    .sticky3,
    .sticky4 {
        position: static;
    }
    
    #tableWrapper {
        max-height: 500px;
    }
}

/* Badge styles matching header */
.role-badge {
    background-color: var(--laxapana-yellow);
    color: var(--laxapana-black);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid var(--laxapana-black);
}

/* Card and container styling */
.card {
    border: 2px solid var(--laxapana-yellow);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.container-fluid {
    background-color: var(--laxapana-light-gray);
}

/* Form control styling */
.form-control {
    border: 2px solid var(--laxapana-yellow);
    border-radius: 5px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--laxapana-black);
    box-shadow: 0 0 0 3px rgba(163, 172, 236, 0.3);
}

/* Button group styling */
.btn-group .btn {
    border-color: var(--laxapana-yellow);
}

.btn-group .btn:hover {
    background-color: var(--laxapana-yellow);
    color: var(--laxapana-black);
}

/* Quick fix - just make navbar text white */
.navbar-nav .nav-link {
    color: #ffffff !important;
}

.navbar-nav .nav-link:hover {
    color: var(--laxapana-black) !important;
}


  h2 {
            font-weight: bold;
            color: var(--laxapana-yellow);
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
            padding: 15px 0;
            border-bottom: 3px solid var(--laxapana-yellow);
            margin-bottom: 30px;
            background: linear-gradient(135deg, var(--laxapana-black) 0%, var(--laxapana-dark-gray) 100%);
            border-radius: 8px;
            padding-left: 20px;
        }


         .loader {
            width: 32px;
            height: 32px;
            position: relative;
            border-radius: 50%;
            color: var(--laxapana-yellow);
            animation: fill 1s ease-in infinite alternate;
        }

        .loader::before,
        .loader::after {
            content: '';
            position: absolute;
            height: 100%;
            width: 100%;
            border-radius: 50%;
            left: 48px;
            top: 0;
            animation: fill 0.9s ease-in infinite alternate;
        }

        .loader::after {
            left: auto;
            right: 48px;
            animation-duration: 0.5s;
        }
       #search {
    width: 10%;
    margin-top: 20px;
    background-color: var(--laxapana-dark-gray);
    color: var(--laxapana-yellow);
    font-weight: bold; /* Make text bold */
}

/* Focus glow */
#search:focus {
    outline: none;
    box-shadow: 0 0 6px var(--laxapana-yellow);
    border-color: var(--laxapana-yellow);
}

/* Hover glow */
#search:hover {
    box-shadow: 0 0 6px var(--laxapana-yellow);
}
.theme-export-btn {
    background-color: #ffffff; /* White */
    color: var(--laxapana-dark-gray); /* Dark gray text */
    border: 2px solid var(--laxapana-yellow);
    font-weight: bold;
    transition: all 0.3s ease;
}

/* Hover */
.theme-export-btn:hover {
    background-color: var(--laxapana-yellow); /* Yellow */
    color: var(--laxapana-dark-gray); /* Gray text */
    border-color: var(--laxapana-yellow);
    box-shadow: 0 0 6px var(--laxapana-yellow);
}

/* Focus */
.theme-export-btn:focus {
    outline: none;
    box-shadow: 0 0 6px var(--laxapana-yellow);
}
