/* CSBYKP Custom Styles */

@import url("https://fonts.googleapis.com/css2?family=League+Gothic&display=swap");

/* Custom Font */
@font-face {
    font-family: "alternate-gothic-no-2-d";
    src: url("./assets/fonts/alternategothic1.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}

:root {
    --csbykp-primary: #81bc26;
    --csbykp-success: #84cc16;
    --csbykp-dark: #3e8f3e;
    --csbykp-green: #81bc26;
}

/* Body and Input Styling */
body {
    color: #3b4043;
    padding: 0px 10px;
}

input, textarea, select {
    font-family: Arial, sans-serif;
}

/* Navbar Styling */
h1, h2, h3 {
    font-family: "League Gothic", serif;
    font-optical-sizing: auto;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #3b4043;
}

.navbar {
    font-family: "League Gothic", serif;
    padding: 0px !important;
    background-color: #81bc26 !important;
}


.bg-csbykp-primary {
    background-color: #81bc26 !important;
}

.navbar-bg-color {
    background-color: #81bc26 !important;
}

.navbar-bg-color-grey {
    background-color: darkgrey !important;
}

.navbar .navbar-brand {
    font-size: 24px !important;
    color: white !important;
    font-family: "League Gothic", "alternate-gothic-no-2-d", Arial, sans-serif !important;
    font-weight: normal !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    font-optical-sizing: auto !important;
    text-decoration: none;
}

.navbar .navbar-brand:hover {
    color: #eee !important;
    text-decoration: none;
}

.navbar .nav-link {
    font-size: 18px !important;
    color: white !important;
    padding: 5px 20px !important;
    text-decoration: none !important;
    font-family: "League Gothic", Arial, sans-serif !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    font-optical-sizing: auto !important;
    font-weight: normal !important;
}

.navbar .nav-link:hover {
    color: #eee !important;
    text-decoration: none !important;
}

.navbar .container-fluid {
    font-size: 18px !important;
}

.navbar {
    font-family: "League Gothic", serif !important;
    padding: 0px !important;
    font-optical-sizing: auto !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
}

.navbar ul {
    margin: 0 !important;
    padding: 0 !important;
}

.navbar li {
    list-style: none !important;
}

.nav-item svg, .nav-link i {
    margin-right: 7px;
    font-size: 15px;
    vertical-align: baseline;
}

.dropdown-menu a,
.dropdown-menu a:hover {
    color: black;
    font-family: sans-serif;
    font-size: 12px;
}
a:hover {
    text-decoration: none !important;
}

/* Button Styling */
.btn-csbykp {
    background-color: var(--csbykp-success);
    border-color: var(--csbykp-success);
    color: white;
}

.btn-csbykp:hover {
    background-color: #65a30d;
    border-color: #65a30d;
    color: white;
}

.btn-color {
    background-color: #81bc26 !important;
    color: white !important;
    border-color: #81bc26;
}

.btn-color:hover,
.btn-color:focus {
    background-color: #419641 !important;
    background-position: 0 -15px !important;
}

.btn {
    font-size: 16px;
}

a.btn, a.btn:hover {
    text-decoration: none;
}

/* Container and Link Styling */
.container a, .container-fluid a {
    text-decoration: none;
}

.container a:hover, .container-fluid a:hover {
    text-decoration: underline;
}

/* Table Styling */
.table-block {
    box-shadow: 0px 0px 10px #a7d129;
    border-radius: 10px;
    font-size: 0.9rem;
    overflow: auto;
}

.table-block a {
    color: #337ab7;
}

.table-block table thead {
    background-color: #a7d129;
    color: white;
}

.table-block table th, .table-block table td {
    padding: 8px;
}

.table-transparent,
.table-transparent th,
.table-transparent td,
.table-transparent thead,
.table-transparent tbody,
.table-transparent tr {
    background-color: transparent !important;
}

/* Login Card */
.login-card {
    max-width: 500px;
    margin: 50px auto;
}

.password-input {
    position: relative;
}

.password-input .form-control {
    padding-left: 40px;
}

.password-input::before {
    content: '🔒';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

/* pagination Styling */
.pagination .page-link {
    color: var(--csbykp-primary);
    border-color: var(--csbykp-primary);
}

.pagination .page-item.active .page-link {
    background-color: var(--csbykp-primary);
    border-color: var(--csbykp-primary);
    color: white;
}

.pagination .page-link:hover {
    background-color: var(--csbykp-primary);
    border-color: var(--csbykp-primary);
    color: white;
}

/* Utility Classes */
.csbykp-green {
    color: #81bc26 !important;
}

h4 {
    font-weight: normal;
}

.small-font {
    font-size: 16px;
}

input[readonly], textarea[readonly], input[readonly]:focus, textarea[readonly]:focus {
    background-color: #eeeeee;
}

/* Pure jQuery Table Sorting Styles */
.sortable {
    position: relative;
    cursor: pointer;
    user-select: none;
    padding-right: 20px !important;
}

.sortable:after {
    content: '\2195';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.5;
    font-size: 12px;
}

.sortable.desc:after {
    content: '\2193';
    opacity: 1;
}

.sortable.asc:after {
    content: '\2191';
    opacity: 1;
}

.sortable:hover:after {
    opacity: 0.8;
}

.chat-container {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="chat-bg" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="%23ddd" opacity="0.3"/></pattern></defs><rect width="100" height="100" fill="url(%23chat-bg)"/></svg>');
}

.message {
    max-width: 70%;
    word-wrap: break-word;
    border-radius: 18px;
    padding: 10px 15px;
    position: relative;
    display: inline-block;
}

.customer-message {
    background: #dcf8c6;
    margin-left: auto;
    border-bottom-right-radius: 5px;
}

.staff-message {
    background: white;
    border: 1px solid #e0e0e0;
    margin-right: auto;
    border-bottom-left-radius: 5px;
}

.message-content {
    margin-bottom: 5px;
    line-height: 1.4;
}

.message-time {
    font-size: 11px;
    color: #666;
    text-align: right;
}

.staff-message .message-time {
    text-align: left;
}

.message-wrapper {
    display: flex;
    flex-direction: column;
}

/* Responsive Design */
@media (max-width: 1440px) {
    .navbar .nav-link {
        padding: 5px 8px !important;
        font-size: 16px !important;
    }
}

@media (max-width: 768px) {
    .navbar .nav-link {
        font-size: 14px !important;
        padding: 8px 12px !important;
    }
}

/* Loader Styles */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s, opacity 0.3s linear;
}

.loader-overlay.active {
    visibility: visible;
    opacity: 1;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--csbykp-primary);
    border-bottom-color: transparent;
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}