/* ==========================================================================
   HMS SETTINGS TAB - HIGH-IMPACT PREMIUM EDITION (Smooth & Solid)
   ========================================================================== */

/* 1. Master Container (Rich, elevated SaaS look) */
.hms-settings-container {
    display: flex;
    background: var(--hms-white);
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.06);
    /* Deep, multi-layered premium shadow */
    box-shadow: 
        0 20px 40px -10px rgba(0, 0, 0, 0.08), 
        0 8px 16px -4px rgba(0, 0, 0, 0.04);
    min-height: 75vh;
}

/* 2. Distinct, Structured Sidebar */
.hms-settings-nav {
    width: 250px;
    background: var(--hms-off-white);
    padding: 10px 12px;
    flex-shrink: 0;
    border-right: 1px solid rgba(0, 0, 0, 0.04);
    position: relative;
    z-index: 2;
}

.hms-settings-nav .nav-item {
    padding: 12px 14px;
    margin-bottom: 10px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--hms-black-light);
    display: flex;
    align-items: center;
    gap: 12px;
    /* Smooth linear glide, no bounce */
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    border: 1px solid transparent;
}

.hms-settings-nav .nav-item .dashicons {
    color: var(--hms-black-light);
    opacity: 0.6;
    font-size: 20px;
    width: 20px; height: 20px;
    transition: all 0.3s ease;
}

/* Satisfying Hover State */
.hms-settings-nav .nav-item:hover {
    background: var(--hms-white);
    border-color: rgba(0, 0, 0, 0.05);
    color: var(--hms-black);
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    transform: translateX(4px);
}

.hms-settings-nav .nav-item:hover .dashicons {
    color: var(--hms-primary);
    opacity: 1;
}

/* High-Impact Active State (Vibrant Gradient Pill) */
.hms-settings-nav .nav-item.active {
    background: linear-gradient(135deg, var(--hms-primary), color-mix(in srgb, var(--hms-primary) 70%, black));
    color: var(--hms-white);
    box-shadow: 0 8px 20px var(--hms-primary-glow);
    border-color: transparent;
    transform: translateX(6px);
}

.hms-settings-nav .nav-item.active .dashicons {
    color: var(--hms-white) !important;
    opacity: 1;
}

/* 3. Content Area (Bright and Crisp) */
.hms-settings-content-area {
    flex: 1;
    padding: 25px 35px;
    background: var(--hms-white);
    overflow-y: auto;
    position: relative;
}

.settings-section {
    display: none;
}

/* Smooth, solid entrance animation (No bounce, no scale) */
.settings-section.active {
    display: block;
    animation: hmsSmoothFade 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.section-header {
    margin-bottom: 40px;
    padding-bottom: 25px;
    border-bottom: 2px solid var(--hms-off-white);
}

.section-header h3 {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 700;
    color: var(--hms-black);
    /*letter-spacing: -0.04em;*/
}

.section-header p {
    color: var(--hms-black-light);
    opacity: 0.8;
    font-size: 15px;
    margin: 0;
    font-weight: 500;
}

/* 4. Form Grid */
.hms-settings-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.hms-setting-field { display: flex; flex-direction: column; }
.hms-settings-full { width: 100%; }
.hms-settings-70 { width: calc(70% - 12px); }
.hms-settings-30 { width: calc(30% - 12px); }
.hms-settings-50 { width: calc(50% - 12px); }
.hms-settings-33 { width: calc(33.333% - 16px); }

/* 5. Highly Tangible Inputs (Thick borders, deep shadows) */
.hms-setting-field label {
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--hms-black-light);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    letter-spacing: 0.5px;
}

.hms-setting-field label span.dashicons {
    font-size: 16px;
    width: 16px; height: 16px;
    margin-right: 6px;
    color: var(--hms-primary);
}

.hms-setting-input {
    width: 100%!important;
    padding: 14px 18px!important;
    border: 2px solid rgba(0, 0, 0, 0.08)!important; /* Thicker, visible boundary */
    border-radius: 12px!important;
    font-size: 15px;
    font-weight: 600;
    color: var(--hms-black);
    background-color: var(--hms-off-white);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1)!important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.hms-setting-input:hover {
    border-color: rgba(0, 0, 0, 0.15)!important;
    background-color: var(--hms-white);
}

.hms-setting-input:focus {
    background-color: var(--hms-white);
    border-color: var(--hms-primary)!important;
    outline: none;
        box-shadow: 0 0px 9px 2px var(--hms-primary-glow), 0 9px 16px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px)!important;
}

/* 6. Stunning Logo Dropzone */
.hms-logo-uploader-box {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 20px;
    background: var(--hms-white);
    border: 2px dashed rgba(0, 0, 0, 0.15);
    border-radius: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.hms-logo-uploader-box:hover {
    border-color: var(--hms-primary);
    background: var(--hms-glass-gradient);
    box-shadow: 0 10px 25px var(--hms-primary-glow);
    transform: translateY(-2px);
}

#hms-logo-preview-container {
    width: 90px; height: 90px;
    background: var(--hms-white);
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

#hms-logo-preview { max-width: 100%; max-height: 100%; object-fit: contain; }

#hms-logo-placeholder { text-align: center; color: var(--hms-black-light); opacity: 0.6; }
#hms-logo-placeholder p {
    margin: 5px 0 0 0;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.hms-logo-controls .button-primary { border-radius: 10px !important; }
.hms-logo-controls .button-link-delete {
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    color: var(--hms-red);
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s;
}
.hms-logo-controls .button-link-delete:hover { background: rgba(220, 38, 38, 0.1); }

/* 7. Juicy Toggle Switches */
.hms-toggle-wrapper {
    display: inline-flex;
    align-items: center;
    background: var(--hms-off-white);
    padding: 10px 16px;
    border-radius: 12px;
    border: 2px solid rgba(0, 0, 0, 0.08);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.hms-switch {
    position: relative;
    display: inline-block;
    width: 48px; height: 26px;
    margin-right: 12px;
}
.hms-switch input { opacity: 0; width: 0; height: 0; }
.hms-slider {
    position: absolute; cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.15);
    transition: .3s cubic-bezier(0.16, 1, 0.3, 1); 
    border-radius: 30px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}
.hms-slider:before {
    position: absolute; content: "";
    height: 20px; width: 20px;
    left: 3px; bottom: 3px;
    background-color: var(--hms-white);
    transition: .3s cubic-bezier(0.16, 1, 0.3, 1); /* Smooth glide */
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
input:checked + .hms-slider { background-color: var(--hms-primary); box-shadow: 0 0 10px var(--hms-primary-glow); }
input:checked + .hms-slider:before { transform: translateX(22px); }

/* 8. Impactful Tax Table */
#hms-tax-fields .wp-list-table {
    border: 2px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 16px !important;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
}

#hms-tax-fields .wp-list-table thead th {
    background: var(--hms-off-white) !important;
    border-bottom: 2px solid rgba(0, 0, 0, 0.08) !important;
    font-size: 13px;
    color: var(--hms-black-light);
    font-weight: 800;
    padding: 16px;
}

#hms-tax-fields .wp-list-table tbody tr { 
    background: var(--hms-white) !important; 
    transition: all 0.2s ease;
}
#hms-tax-fields .wp-list-table tbody tr:hover {
    background: var(--hms-off-white) !important;
}
#hms-tax-fields .wp-list-table tbody td { 
    border-bottom: 1px solid rgba(0, 0, 0, 0.04); 
    padding: 16px;
    font-weight: 600;
}

/* Floating Glass Warning & Add Boxes */
#hms-tax-fields > div, 
.hms-setting-field[hms-settings-full] > div[style*="#fcf8e3"] {
    background: var(--hms-glass-gradient) !important;
    border: 2px solid var(--hms-primary) !important;
    border-radius: 16px !important;
    padding: 24px !important;
    box-shadow: 0 10px 25px var(--hms-primary-glow) !important;
}

/* 9. Heavy Action Footer */
.settings-footer {
    margin-top: 50px;
    padding-top: 30px;
    display: flex;
    justify-content: flex-end;
    border-top: 2px solid var(--hms-off-white);
}

.settings-footer .button-primary {
    /* Rich, dark premium gradient */
        background: linear-gradient(155deg, var(--hms-primary) 0%, #111114 100%) !important;
    color: var(--hms-white) !important;
    
    /* Subtle 1px glass-like border to make it pop */
    border: 1px solid rgba(255, 255, 255, 0.08) !important; 
    border-radius: 10px !important;
    padding: 0px 20px !important; /* Slightly wider padding looks more premium */
    height: 46px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    
    /* Deep shadow + a subtle white inner glow on top */
    box-shadow: 
        0 10px 20px rgba(0, 0, 0, 0.15), 
        inset 0 1px 1px rgba(255, 255, 255, 0.1) !important;
        
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Make it slightly lighter and lift up on hover */
.settings-footer .button-primary:hover {
    background: linear-gradient(135deg, #353740 0%, #1a1a20 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 
        0 15px 30px rgba(0, 0, 0, 0.25), 
        inset 0 1px 1px rgba(255, 255, 255, 0.15) !important;
}

/* =========================================================
   ANIMATIONS (Smooth Glide)
   ========================================================= */
@keyframes hmsSmoothFade {
    0% { opacity: 0; transform: translateY(15px); }
    100% { opacity: 1; transform: translateY(0); }
}


.button-primary{
background: rgb(29 29 29 / 14%) !important;
    color: #020202 !important;
    border: 1px solid black !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px;
    padding: 11px 20px !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    /* text-transform: uppercase; */
    cursor: pointer !important;
    border: none !important;
    transition: 0.2s !important;
    white-space: nowrap !important;
    height: 50px;}

.heroicon{
   
    width: 16px !important; /* Slightly smaller icon to balance with text */
    height: 16px !important;
    stroke: currentColor !important;
    fill: none !important;
    display: block !important;
}




.hms-tax-priority-input {
    width: 82px !important;
    height: 36px !important;
    padding: 6px 10px !important;
    border: 1px solid #dbe3ef !important;
    border-radius: 10px !important;
    background: #fff !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    text-align: center;
}

.hms-tax-row-disabled {
    opacity: 0.55;
    background: #f8fafc !important;
}

.hms-tax-status-mini {
    display: inline-flex;
    margin-top: 5px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.hms-tax-status-mini.enabled {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.hms-tax-status-mini.disabled {
    background: #fff1f2;
    color: #be123c;
    border: 1px solid #fecdd3;
}

.hms-tax-mini-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
}

.hms-tax-mini-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.hms-tax-mini-switch span {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #cbd5e1;
    border-radius: 999px;
    transition: 0.25s ease;
}

.hms-tax-mini-switch span:before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.25s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}

.hms-tax-mini-switch input:checked + span {
    background: var(--hms-primary);
}

.hms-tax-mini-switch input:checked + span:before {
    transform: translateX(22px);
}

@media (max-width: 768px) {
    .hms-tax-priority-input {
        width: 68px !important;
    }
}







.hms-tax-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.hms-tax-modal-box {
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
    border: 1px solid rgba(255,255,255,0.8);
    animation: hmsTaxModalIn 0.25s ease forwards;
    text-align: center;
}

.hms-tax-modal-icon {
    width: 70px;
    height: 70px;
    border-radius: 22px;
    margin: 0 auto 18px;
    background: #fff1f2;
    color: #e11d48;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #fecdd3;
}

.hms-tax-modal-icon .dashicons {
    font-size: 34px;
    width: 34px;
    height: 34px;
}

.hms-tax-modal-content h3 {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 900;
    color: #0f172a;
    letter-spacing: -0.4px;
}

.hms-tax-modal-content p {
    margin: 0;
    color: #475569;
    font-size: 14px;
    line-height: 1.6;
}

.hms-tax-modal-content p strong {
    color: #111827;
}

.hms-tax-modal-content small {
    display: block;
    margin-top: 8px;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 700;
}

.hms-tax-modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 24px;
}

.hms-tax-modal-actions button {
    height: 46px;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 900;
    transition: 0.22s ease;
}

.hms-tax-modal-cancel {
    background: #f1f5f9;
    color: #475569;
}

.hms-tax-modal-cancel:hover {
    background: #e2e8f0;
}

.hms-tax-modal-delete {
    background: #e11d48;
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(225, 29, 72, 0.28);
}

.hms-tax-modal-delete:hover {
    background: #be123c;
    transform: translateY(-1px);
}

@keyframes hmsTaxModalIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}