.billing {
    display: none;
}

.shipping {
    display: none;
}

.my-custom-scrollbar {
    position: relative;
    height: 325px;
    overflow: auto;
}

.table-wrapper-scroll-y {
    display: block;
}


.well {
    background: none;
    height: 320px;
}

.table-scroll tbody {
    position: absolute;
    overflow-y: scroll;
    height: 250px;
}

.table-scroll tr {
    width: 100%;
    table-layout: fixed;
    display: inline-table;
}

.table-scroll thead>tr>th {
    border: none;
}

/* Global Gradient Button */
.addbutton {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    transition: transform 0.2s, box-shadow 0.2s;
}

.addbutton:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(118, 75, 162, 0.3);
    color: white;
}

/* Global Side Modal Styles */
body.side-modal-open {
    overflow: hidden;
}

.side-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1040;
    display: none;
    backdrop-filter: blur(2px);
}

.side-modal {
    position: fixed;
    top: 0;
    right: -760px;
    width: 750px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 10050;
    transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
}

.side-modal400 {
    width: 400px;
    right: -410px;
}

.side-modal750 {
    width: 750px;
    right: -760px;
}

.side-modal.no-scrollbar .modal-body {
    overflow-y: hidden !important;
}

.side-modal.open {
    right: 0;
}

.side-modal form {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

/* Modal Header */
.modal-header {
    z-index: 9999;
    padding: 15px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #395697 0%, #2c4578 100%);
    /* Default Theme Colors */
    color: #fff;
}

/* Header Title Wrapper & Icon */
.modal-title-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-title-wrapper .modal-icon {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
}

.modal-header-close-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 1.3rem;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.modal-header-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.side-modal-body,
.modal-body {
    padding: 10px;
    overflow-y: auto;
    flex-grow: 1;
    scrollbar-width: thin;
    overflow-x: hidden;
}

.modal-footer-custom {
    display: flex;
    justify-content: space-between;
    padding: 15px 25px;
    border-top: 1px solid #e2e8f0;
    background: #fff;
    margin-top: auto;
    /* Push to bottom */
    flex-shrink: 0;
}

.sticky-footer {
    position: sticky;
    bottom: 0;
    z-index: 10;
    background: white;
}

.modal-footer-custom .btn-close-modal {
    color: #fff;
    border: none;
    padding: 10px 25px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    background-color: #dc3545;
}

.modal-footer-custom .btn-save-modal {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: #fff;
    border: none;
    padding: 10px 30px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-footer-custom .btn-save-modal:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Modal Form Styles */
.side-modal .form-control {
    border-radius: 6px;
    border: 1px solid #dde2e5;
    padding: 10px 12px;
    height: auto;
}

.side-modal .form-control:focus {
    border-color: #395697;
    box-shadow: 0 0 0 3px rgba(57, 86, 151, 0.1);
}

.side-modal .form-group label {
    font-weight: 500;
    color: #555;
    margin-bottom: 5px;
}

/* Sidebar Submenu Styling Fixes */
/* Active state for submenu items to match hover */
.sidebar-nav .metismenu ul li.active>a {
    color: #3eacff !important;
    /* Theme blue to match active/hover state */
    font-weight: 600;
    /* Maintained slightly bolder weight */
}

/* Fix for loading state (focus/active) turning white */
.sidebar-nav .metismenu ul a:focus,
.sidebar-nav .metismenu ul a:active {
    color: #3eacff !important;
    background-color: transparent !important;
    /* Prevent white background */
    outline: none;
    text-decoration: none;
}

/* Ensure hover behaves consistently */
.sidebar-nav .metismenu ul a:hover {
    color: #3eacff !important;
    background-color: transparent !important;
    text-decoration: none;
}

/* Modal Loading Wrapper Styles */
.modal-loading-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 250px;
    background: transparent;
}

.loading-spinner-container {
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: 25px;
}

.loading-spinner {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top-color: #395697;
    border-bottom-color: #395697;
    border-radius: 50%;
    animation: spin-premium 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

.loading-spinner::before {
    content: "";
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 3px solid transparent;
    border-left-color: #667eea;
    border-right-color: #667eea;
    border-radius: 50%;
    animation: spin-premium-inner 2s linear infinite reverse;
}

.loading-spinner::after {
    content: "";
    position: absolute;
    top: 25px;
    left: 25px;
    right: 25px;
    bottom: 25px;
    border: 3px solid transparent;
    border-top-color: #764ba2;
    border-radius: 50%;
    animation: spin-premium 1s ease-in-out infinite;
}

@keyframes spin-premium {
    0% {
        transform: rotate(0deg) scale(1);
    }

    50% {
        transform: rotate(180deg) scale(1.1);
    }

    100% {
        transform: rotate(360deg) scale(1);
    }
}

@keyframes spin-premium-inner {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-text {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: #334155;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.loading-dots span {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: linear-gradient(135deg, #395697, #667eea);
    margin: 0 3px;
    animation: pulse-dots 1.5s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes pulse-dots {

    0%,
    80%,
    100% {
        transform: scale(0.6);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Action Button Styles (Dropdown Hover) */
.action-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background-color: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    background-color: #f7fafc;
    border-color: #cbd5e0;
    color: #2d3748;
}

.action-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 170px;
    background-color: #fff;
    border-radius: 6px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    z-index: 50;
    /* Animation Properties */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    /* Start 10px below */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 5px;
}

.action-btn:hover .action-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    /* Slide up to original pos */
}

.action-dropdown-inner {
    padding: 5px 0;
}

.action-item {
    display: block;
    width: 100%;
    padding: 8px 16px;
    font-size: 13px;
    color: #4a5568;
    text-align: left;
    text-decoration: none;
    transition: background-color 0.2s;
}

.action-item:hover {
    background-color: #ebf4ff;
    color: #2b6cb0;
    text-decoration: none;
}

.action-item i {
    width: 20px;
    margin-right: 5px;
    text-align: center;
}

/* Select2 Z-Index Fix for Side Modal */
.select2-container {
    width: 100% !important;
    z-index: 1060;
}

.select2-container--default .select2-results>.select2-results__options {
    scrollbar-width: thin;
}

.select2-container--open .select2-dropdown {
    z-index: 99999 !important;
}

/* SweetAlert2 Z-Index Fix for Modals */
.swal2-container {
    z-index: 99999 !important;
}