/* Society ERP Custom Static Stylesheet */

/* Floating Dropdown Menu (Top Layer - Zero Table Clipping) */
.table-dropdown-menu {
    display: none;
    position: fixed;
    width: 12rem;
    border-radius: 0.5rem;
    border: 1px solid #cbd5e1;
    background-color: #ffffff;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.15), 0 8px 10px -6px rgba(15, 23, 42, 0.08);
    z-index: 9999;
}

.table-dropdown-menu.is-open {
    display: block;
}

/* Dynamic info-icon tooltip (JS-positioned, clamped to viewport) */
.info-tooltip-bubble {
    display: none;
    position: fixed;
    z-index: 9999;
    max-width: 220px;
    width: max-content;
    border-radius: 0.375rem;
    background-color: #1e293b;
    color: #ffffff;
    padding: 0.375rem 0.625rem;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.35;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.15), 0 8px 10px -6px rgba(15, 23, 42, 0.08);
    pointer-events: none;
}

.info-tooltip-bubble.is-open {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 400;
    color: #334155;
    transition: background-color 0.15s ease;
}

.dropdown-item:hover {
    background-color: #f1f5f9;
}

/* ==========================================
   Global Toast & Alert Top-Right 3s Progress Bar
   ========================================== */
@keyframes toastProgress {
    0% {
        width: 100%;
    }
    100% {
        width: 0%;
    }
}

.animate-toast-progress {
    animation: toastProgress linear forwards;
}

.animate-toast-progress.paused {
    animation-play-state: paused !important;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%) scale(0.92);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateX(100%) scale(0.92);
    }
}

.toast-enter {
    animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast-exit {
    animation: toastSlideOut 0.25s cubic-bezier(0.7, 0, 0.84, 0) forwards;
}

/* ==========================================
   Global Custom Confirmation Modal Animations
   ========================================== */
@keyframes modalBackdropFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalBackdropFadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes modalContentZoomIn {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(12px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes modalContentZoomOut {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.92) translateY(12px);
    }
}

.modal-backdrop-show {
    animation: modalBackdropFadeIn 0.2s ease-out forwards;
}

.modal-backdrop-hide {
    animation: modalBackdropFadeOut 0.15s ease-in forwards;
}

.modal-card-show {
    animation: modalContentZoomIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.modal-card-hide {
    animation: modalContentZoomOut 0.18s ease-in forwards;
}

/* ==========================================
   Global Form Modal (ajax-loaded create/edit forms)
   ========================================== */
#global-form-modal .form-modal-hide-in-modal {
    display: none;
}

/* ==========================================
   Inline Superadmin Panel Swap (Summary <-> Form)
   ========================================== */
.superadmin-view {
    opacity: 1;
}

.superadmin-view-hidden {
    display: none;
    opacity: 0;
}

[data-superadmin-view="summary"].superadmin-view-entering {
    animation: superadminSlideInFromLeft 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-superadmin-view="form"].superadmin-view-entering {
    animation: superadminSlideInFromRight 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes superadminSlideInFromRight {
    from {
        opacity: 0;
        transform: translateX(16px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ==========================================
   Inline Society Profile Panel Swap (Summary <-> Form)
   ========================================== */
.society-view {
    opacity: 1;
}

.society-view-hidden {
    display: none;
    opacity: 0;
}

[data-society-view="summary"].society-view-entering {
    animation: superadminSlideInFromLeft 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-society-view="form"].society-view-entering {
    animation: superadminSlideInFromRight 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes superadminSlideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-16px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ==========================================
   Global Premium Loader Keyframe Animations
   ========================================== */
@keyframes loaderPulseLogo {
    0%, 100% {
        transform: scale(0.95);
        filter: drop-shadow(0 0 4px rgba(30, 64, 175, 0.25));
    }
    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 12px rgba(16, 185, 129, 0.45));
    }
}

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

@keyframes loaderShimmerLine {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
    100% { transform: translateX(200%); }
}

.animate-pulse-logo {
    animation: loaderPulseLogo 2s ease-in-out infinite;
}

.animate-spin-reverse {
    animation: loaderSpinReverse 1.5s linear infinite;
}

.animate-shimmer-line {
    animation: loaderShimmerLine 1.8s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ==========================================
   Global Form Field Controls Styling
   ========================================== */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="date"],
select,
textarea {
    display: block;
    width: 100%;
    border-radius: 0.375rem;
    border: 1px solid #cbd5e1;
    background-color: #ffffff;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: #0f172a;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

input[type="password"] {
    padding-right: 2.5rem;
}

.topbar input[type="text"].has-search-icon {
    padding-left: 2.25rem;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder,
input[type="number"]::placeholder,
textarea::placeholder {
    color: #94a3b8;
}

input[type="checkbox"] {
    height: 1.125rem;
    width: 1.125rem;
    border-radius: 0.25rem;
    border: 1px solid #cbd5e1;
    accent-color: #2563eb;
    cursor: pointer;
}

/* ==========================================
   Global UI Theme Utilities & Component Classes
   ========================================== */

.page-header-box {
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.page-title-text {
    font-size: 1.5rem;
    line-height: 2rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.page-subtitle-text {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
}

.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.25rem;
}

.breadcrumb-nav a {
    color: #475569;
    transition: color 0.15s ease;
}

.breadcrumb-nav a:hover {
    color: #2563eb;
    text-decoration: underline;
}

.card-box-theme {
    overflow: hidden;
    border-radius: 0.75rem;
    border: 1px solid #cbd5e1;
    background-color: #ffffff;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.card-box-header {
    border-bottom: 1px solid #cbd5e1;
    background-color: rgba(248, 250, 252, 0.8);
    padding: 1rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.card-box-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-bar-theme {
    margin-bottom: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid #cbd5e1;
    background-color: #ffffff;
    padding: 1rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* ==========================================
   Material Symbols Icon Font — prevent FOUT
   (raw ligature text like "search"/"close" flashing
   before the icon font swaps in on soft reloads)
   ========================================== */
.material-symbols-outlined {
    opacity: 0;
}

html.fonts-loaded .material-symbols-outlined {
    opacity: 1;
}

/* ==========================================
   Collapsible Sidebar
   ========================================== */
body.sidenav-collapsed .sidenav {
    width: 76px;
}

body.sidenav-collapsed .sidenav-brand {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

body.sidenav-collapsed .sidenav-label {
    display: none;
}

body.sidenav-collapsed .sidenav nav a,
body.sidenav-collapsed .sidenav nav span.flex,
body.sidenav-collapsed .mt-auto a,
body.sidenav-collapsed .mt-auto span.flex {
    justify-content: center;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

body.sidenav-collapsed .sidenav-user {
    justify-content: center;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

body.sidenav-collapsed #sidenav-toggle span {
    transform: rotate(180deg);
}

body.sidenav-collapsed .topbar {
    margin-left: 76px;
    width: calc(100% - 76px);
}

body.sidenav-collapsed .main-content {
    margin-left: 76px;
}

