/* Company Setting.

   The same shape as InvoiceSettings.css -- a pinned container holding one column of full-width
   buttons -- because the two pages are reached the same way and should not look like different
   parts of the app. Kept as its own file rather than sharing that one: the pages have nothing in
   common but their layout, and a single sheet would mean restyling one moves the other. */

.company-setting-container {
    position: fixed;
    top: 4rem;
    bottom: 4rem;
    left: 14rem;
    right: 0;
    transition: left 0.2s ease;
}

/* Sidebar collapsed to icon-only (4.5rem, see SidebarLayout.razor.css). InvoiceSettings has no such
   rule and leaves a 9rem gap there; this is the one place the two pages deliberately differ. */
.company-setting-container.sidebar-collapsed {
    left: 5rem;
}

.company-setting-column {
    margin-left: 10px;
    margin-right: 10px;
    display: grid;
    grid-template-columns: auto;
    justify-items: start;
    gap: 10px;
}

/* Which company the button below is about. A destructive action named only "Delete Company" makes
   the reader go and check the header for which one that is. */
.company-setting-name {
    font-size: 15px;
    font-weight: bold;
    color: #222;
}

/* InvoiceSettings' button, in red: same 35px height, 350px width, radius and shadow, so the two
   settings pages read as one set of controls even though this one is the dangerous member of it. */
.company-setting-delete-btn {
    height: 35px;
    width: 350px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 6px;
    border: 1px solid #f0b4ba;
    border-radius: 6px;
    background: #fff;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    color: #d92d3c;
    transition: background-color .12s ease, border-color .12s ease, color .12s ease;
}

.company-setting-delete-btn:hover:not(:disabled) {
    background: #d92d3c;
    border-color: #d92d3c;
    color: #ffffff;
}

.company-setting-delete-btn:disabled {
    opacity: .6;
    cursor: default;
}

.company-setting-note {
    max-width: 350px;
    font-size: 12px;
    line-height: 1.5;
    color: #6b7280;
}

/* Below 700px the sidebar goes off-canvas and the top band is two lines tall (MainLayout2.razor.css),
   the same deal every other page strikes -- so this drops out of position:fixed and flows, clearing
   the band by the margin instead of by a top offset that no longer holds. */
@media (max-width: 700px) {
    .company-setting-container,
    .company-setting-container.sidebar-collapsed {
        position: static;
        top: auto;
        bottom: auto;
        left: auto;
        right: auto;
        margin: 5.5rem 1rem 1rem;
    }

    .company-setting-column {
        margin-left: 0;
        margin-right: 0;
    }

    .company-setting-delete-btn,
    .company-setting-note {
        width: 100%;
        max-width: none;
    }
}
