/* ================================================
   INLINE INVOICE DISCOUNTS - Custom Styles
   ================================================ */

/* Discount column styling */
.bill_col_discount {
    min-width: 150px;
}

.bill_col_discount .input-group-append {
    width: 60px;
}

.bill_col_discount .js_item_discount_type {
    font-size: 12px;
    padding: 0.25rem;
}

/* Hide discount column when needed */
.bill_col_discount.hidden {
    display: none !important;
}

/* Disabled button styling */
button.disabled,
a.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ================================================
   ROYALSOFT LLC BRAND THEME
   Applied on top of the default theme (public/themes/default) -
   keeps the same layout/framework, only recolors + rebrands.
   ================================================ */

body,
.form-control,
.btn {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* sidebar + topbar - dark navy, matches the public site hero */
.left-sidebar,
.topbar,
.left-sidebar .scroll-sidebar,
.left-sidebar .sidebar-nav,
.mini-sidebar .sidebar-nav #sidebarnav > li > ul {
    background-color: var(--brand-dark, #1f2937) !important;
}

/* catch-all: every piece of text and every icon glyph inside the sidebar or
   topbar must be light-colored against the dark background above. Icon fonts
   (ti-*, sl-icon-*, mdi-*, etc.) render through the CSS "color" property too,
   so this covers icons as well as plain text. Deliberately broad (the * ) so
   nothing - a span, a badge, a nested submenu link - gets missed. */
.left-sidebar,
.left-sidebar *,
.topbar,
.topbar .nav-link,
.topbar .nav-link *,
.topbar .profile-pic,
.topbar .profile-pic *,
.topbar #topnav_username,
.topbar .sidenav-menu-item.exit-panel,
.topbar .sidenav-menu-item.exit-panel * {
    color: rgba(255, 255, 255, .85) !important;
}

.topbar .sidenav-menu-item.exit-panel,
.settings .navbar-header {
    background-color: red !important;
}

.left-sidebar .sidebar-nav ul li a:hover,
.left-sidebar .sidebar-nav ul li a:hover *,
.left-sidebar .sidebar-nav ul li.active > a,
.left-sidebar .sidebar-nav ul li.active > a *,
.left-sidebar .sidebar-nav ul li a.active,
.left-sidebar .sidebar-nav ul li a.active *,
.topbar .nav-link:hover,
.topbar .nav-link:hover * {
    color: #fff !important;
}

.left-sidebar .sidebar-nav ul li.active > a {
    background-color: rgba(var(--brand-primary-rgb, 220, 53, 69), .15) !important;
    border-left: 3px solid var(--brand-primary, #dc3545);
}

/* "Visit Website" topbar link - icon + text, unlike its icon-only neighbors */
.topbar .visit-website-link {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    padding-left: 14px !important;
    padding-right: 14px !important;
    font-size: 14px;
}

/* dropdown menus that open FROM the topbar (notifications, profile, "add content")
   are separate white popup panels - they must keep their normal dark-on-white
   text, not inherit the light color meant for the dark topbar/sidebar itself. */
.dropdown-menu,
.dropdown-menu * {
    color: #333 !important;
}

.dropdown-menu .text-danger,
.dropdown-menu .text-info {
    color: inherit !important;
}

/* brand text fallback (shown only if no logo has been uploaded via Settings > Logo) */
.brand-text-fallback {
    color: #fff;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: .3px;
    padding: 0 15px;
}

/* topbar company logo - the stock theme caps the logo image at 50x45px, so
   it floats tiny inside the ~200px x 72px header slot reserved for it,
   leaving the dark sidebar/topbar background visible all around it.
   Let the logo actually fill that slot (still preserving its own
   aspect ratio, just at a size that uses the available space). */
.sidenav-menu-item.logo {
    height: 72px;
    display: flex;
    align-items: center;
    /* white patch behind the logo so it reads cleanly against the dark navy
       sidebar/topbar instead of sitting directly on top of it */
    background-color: #fff;
    padding: 0 15px;
}

.sidenav-menu-item.logo .navbar-brand {
    display: flex;
    align-items: center;
    height: 100%;
}

.fix-sidebar .logo-large,
.logo-large {
    max-width: 175px;
    max-height: 60px;
    width: auto;
    height: auto;
}

/* keep the accent color consistent with the public website's call-to-action color */
.btn-danger {
    background-color: var(--brand-primary, #dc3545);
    border-color: var(--brand-primary, #dc3545);
}

.btn-danger:hover {
    filter: brightness(85%);
}

/* invoice/estimate view - company & customer address row: one continuous
   background band spanning the full width (left company address through
   right customer address), tighter line spacing between the address rows */
.invoice-address-row {
    background-color: rgba(var(--brand-primary-rgb, 220, 53, 69), .04);
    border-radius: 6px;
    padding: 14px 16px;
}

/* clearfix - the company/customer addresses inside are pull-left/pull-right
   floats, which would otherwise collapse this row's background to nothing */
.invoice-address-row::after {
    content: "";
    display: table;
    clear: both;
}

.invoice-address-block {
    font-style: normal;
}

/* same background band, continued down from the address row through the
   line-items table and the totals summary (Description -> Total) */
.invoice-lineitems-row {
    background-color: rgba(var(--brand-primary-rgb, 220, 53, 69), .04);
    border-radius: 6px;
    padding: 14px 16px;
    margin-bottom: 20px;
}

/* clearfix - totals-summary.blade.php uses pull-left/pull-right internally,
   which would otherwise collapse this row's background to nothing */
.invoice-lineitems-row::after {
    content: "";
    display: table;
    clear: both;
}

.invoice-address-lines {
    line-height: 1.3;
}
