/* Clean Orange Theme Branch Tabs Component Styles */
/* Only apply pill styles when NOT using modern underline tabs */
.custom-tabs:not(.branch-scroll-tabs) {
    margin-bottom: 1rem;
    padding: 0;
    border: none;
    background: transparent !important;
    box-shadow: none !important;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
}

.custom-tabs:not(.branch-scroll-tabs)::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

/* Exclude modern underline tabs from pill styles */
.branch-tabs-container:not(.modern-underline-tabs) .custom-tabs .nav-item {
    margin-bottom: 0;
    margin-right: 1rem;
    flex-shrink: 0;
    white-space: nowrap;
}

.branch-tabs-container:not(.modern-underline-tabs) .custom-tabs .nav-link {
    border-radius: 50px !important;
    /* Pill shape */
    position: relative;
    padding: 10px 24px;
    border: 1px solid #e0e0e0;
    margin-right: 0;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    text-align: center;
    min-width: 140px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.branch-tabs-container:not(.modern-underline-tabs) .custom-tabs .nav-link i {
    font-size: 1.1em;
    margin-right: 8px;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.branch-tabs-container:not(.modern-underline-tabs) .custom-tabs .nav-link:hover:not(.active) {
    background: #fff !important;
    border-color: rgba(255, 106, 0, 0.5);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 106, 0, 0.1) !important;
}

.branch-tabs-container:not(.modern-underline-tabs) .custom-tabs .nav-link:hover:not(.active) i {
    opacity: 1;
}

.branch-tabs-container:not(.modern-underline-tabs) .custom-tabs .nav-link.active {
    background: linear-gradient(135deg, #ff8c00 0%, #ff6a00 100%) !important;
    border-color: transparent;
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(255, 106, 0, 0.3) !important;
    transform: translateY(-2px);
}

.branch-tabs-container:not(.modern-underline-tabs) .custom-tabs .nav-link.active i {
    opacity: 1;
}

/* Divider Styling */
.divider-orange {
    border-top: 1px solid orange;
    margin: 1.5rem 0;
    opacity: 0.5;
}

/* Custom interval form styling */
.custom-interval-form {
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e0e0e0;
    background: #fafafa;
    margin-top: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.custom-interval-form .form-control {
    border-radius: 8px;
    border: 1px solid #ddd;
    padding: 10px 12px;
    transition: all 0.3s ease;
}

.custom-interval-form .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.1);
    background: white;
}

.custom-interval-form .btn-success {
    background: linear-gradient(135deg, #ff8c00 0%, #ff6a00 100%);
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 600;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(255, 106, 0, 0.2);
}

.custom-interval-form .btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 106, 0, 0.3);
}

/* Period tabs specific styling */
.custom-tabs[data-period-tabs="true"] {
    margin-top: 1.5rem;
}

.custom-tabs[data-period-tabs="true"] .nav-link {
    min-width: auto;
    padding: 8px 20px;
    font-size: 13px;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .custom-tabs {
        padding: 5px 0 5px 0;
        /* Space for shadow */
        margin-bottom: 0.5rem;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        justify-content: flex-start;
    }

    .custom-tabs .nav-item {
        width: auto;
        margin-bottom: 0;
        margin-right: 12px;
        flex-shrink: 0;
    }

    .custom-tabs .nav-link {
        width: auto;
        text-align: center;
        margin-right: 0;
        padding: 10px 20px;
        min-width: auto;
        white-space: nowrap;
        font-size: 14px;
    }

    .custom-interval-form {
        padding: 1rem;
        margin-top: 1rem;
    }

    .custom-interval-form .col-md-4 {
        width: 100%;
        margin-bottom: 1rem;
    }

    .custom-interval-form .btn {
        width: 100%;
        margin-top: 0;
    }

    /* Reduce vertical gap on mobile */
    .divider-orange {
        margin: 4px 0 !important;
        /* Reduced from 0.5rem */
    }

    .custom-tabs[data-period-tabs="true"] {
        margin-top: 4px !important;
        /* Reduced from 0.5rem */
    }
}

@media (max-width: 576px) {
    .custom-tabs .nav-link {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .custom-tabs {
        padding-left: 5px;
    }
}

/* Empty State Styling */
.branch-empty-state {
    border: 2px dashed #e0e0e0;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    background: #fafafa;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.branch-empty-state:hover {
    border-color: var(--primary);
    background: #fff;
}

/* Empty State Enhancements */
@keyframes bounce-subtle {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

.branch-empty-state {
    border: 2px dashed rgba(255, 106, 0, 0.2);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    background: linear-gradient(to bottom, #fff, #fffbf8);
    margin-bottom: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.branch-empty-state:hover {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 8px 25px rgba(255, 106, 0, 0.08);
    transform: translateY(-2px);
}

.branch-empty-state .btn-primary {
    animation: bounce-subtle 2s infinite ease-in-out;
    background: linear-gradient(135deg, #ff8c00 0%, #ff6a00 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(255, 106, 0, 0.3);
    padding: 12px 28px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.branch-empty-state .btn-primary:hover {
    animation: none;
    /* Stop bounce on hover */
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(255, 106, 0, 0.4);
}

.branch-empty-state i.mdi-store-plus {
    color: #ffdcb0 !important;
    font-size: 3.5rem !important;
    display: block;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.branch-empty-state:hover i.mdi-store-plus {
    color: var(--primary) !important;
    transform: scale(1.1) rotate(-5deg);
}
