/* App buttons — matches nav / side-nav style */

.content a.button,
.content button.button,
.content input.button,
.content input[type="submit"],
.content input[type="button"],
.content button[type="submit"]:not(.dt-button):not(.ui-button),
.order-view-actions a.button,
.order-view-actions button,
.order-view-actions input[type="submit"],
.order-edit-actions a.button,
.order-edit-actions button,
.order-edit-actions input[type="submit"],
.order-form-actions a.button,
.order-form-actions button,
.order-form-actions input[type="submit"],
.login a.button,
.login button[type="submit"],
.login input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    height: auto;
    min-height: 2.5rem;
    margin: 0;
    padding: 0.65rem 1.15rem;
    border: 1px solid #1e293b;
    border-radius: 0.4rem;
    background: #1e293b;
    color: #f8fafc;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: normal;
    text-transform: none;
    text-decoration: none;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    box-sizing: border-box;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.content a.button:hover,
.content a.button:focus,
.content button.button:hover,
.content button.button:focus,
.content input.button:hover,
.content input.button:focus,
.content input[type="submit"]:hover,
.content input[type="submit"]:focus,
.content input[type="button"]:hover,
.content input[type="button"]:focus,
.content button[type="submit"]:not(.dt-button):not(.ui-button):hover,
.content button[type="submit"]:not(.dt-button):not(.ui-button):focus,
.order-view-actions a.button:hover,
.order-view-actions a.button:focus,
.order-view-actions button:hover,
.order-view-actions button:focus,
.order-view-actions input[type="submit"]:hover,
.order-view-actions input[type="submit"]:focus,
.order-edit-actions a.button:hover,
.order-edit-actions a.button:focus,
.order-edit-actions button:hover,
.order-edit-actions button:focus,
.order-edit-actions input[type="submit"]:hover,
.order-edit-actions input[type="submit"]:focus,
.order-form-actions a.button:hover,
.order-form-actions a.button:focus,
.order-form-actions button:hover,
.order-form-actions button:focus,
.order-form-actions input[type="submit"]:hover,
.order-form-actions input[type="submit"]:focus,
.login a.button:hover,
.login a.button:focus,
.login button[type="submit"]:hover,
.login button[type="submit"]:focus,
.login input[type="submit"]:hover,
.login input[type="submit"]:focus {
    background: #334155;
    border-color: #334155;
    color: #fff;
}

/* Secondary / filter / reset actions */
.content a.button:not(.float-right),
.content button.button-secondary,
.content a.button-secondary {
    background: #fff;
    border-color: #cbd5e1;
    color: #475569;
}

.content a.button:not(.float-right):hover,
.content a.button:not(.float-right):focus,
.content button.button-secondary:hover,
.content button.button-secondary:focus,
.content a.button-secondary:hover,
.content a.button-secondary:focus {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #1e293b;
}

/* Danger actions */
.content a.button-danger,
.content button.button-danger,
.content input.button-danger,
.order-view-actions a.button-danger,
.order-view-actions button.button-danger {
    background: #fff;
    border-color: #fca5a5;
    color: #dc2626;
}

.content a.button-danger:hover,
.content a.button-danger:focus,
.content button.button-danger:hover,
.content button.button-danger:focus,
.content input.button-danger:hover,
.content input.button-danger:focus,
.order-view-actions a.button-danger:hover,
.order-view-actions a.button-danger:focus,
.order-view-actions button.button-danger:hover,
.order-view-actions button.button-danger:focus {
    background: #fef2f2;
    border-color: #dc2626;
    color: #b91c1c;
}

/* Index page header actions */
.content > a.button.float-right,
.content > .button.float-right {
    margin-left: 0.5rem;
    margin-bottom: 0.75rem;
}

.content > h3:first-child,
.content > h3 {
    clear: both;
}

.content > h3 + .table-responsive,
.content > a.button.float-right + h3 {
    margin-top: 0;
}

/* Form submit row */
.content form button[type="submit"]:not(.dt-button):not(.ui-button),
.content form input[type="submit"] {
    margin-top: 0.5rem;
    margin-right: 0.5rem;
}

.content .button-lg,
.order-edit-actions .button-lg,
.order-form-actions .button-lg {
    min-height: 3rem;
    padding: 0.85rem 1.65rem;
    font-size: 1.125rem;
}

/* jQuery UI buttons inside content areas */
.content .ui-button,
.content button.ui-button,
.content a.ui-button {
    min-height: 2.5rem;
    padding: 0.65rem 1rem;
    font-size: 1.05rem;
    line-height: 1.2;
}

td.actions,
th.actions {
    white-space: nowrap;
}

td.actions {
    white-space: nowrap;
}

td.actions a,
td.actions form {
    display: inline-flex;
    vertical-align: middle;
    margin: 0 0.2rem 0.2rem 0;
}

td.actions a {
    align-items: center;
    justify-content: center;
    min-width: 2.35rem;
    min-height: 2.35rem;
    padding: 0.45rem 0.7rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.35rem;
    background: #fff;
    color: #475569;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

td.actions a:hover,
td.actions a:focus {
    background: #eff6ff;
    border-color: #2f85ae;
    color: #2f85ae;
}

td.actions a.fa,
td.actions a[class*="fa-"] {
    width: 2.35rem;
    height: 2.35rem;
    padding: 0;
    font-size: 1rem;
}

td.actions a.side-nav-icon,
td.actions .side-nav-icon {
    display: none;
}

/* Nav helper icons inside content buttons */
.content a.button .side-nav-icon,
.content button.button .side-nav-icon,
.order-view-actions a.button .side-nav-icon {
    font-size: 1rem;
    width: 1.1rem;
    text-align: center;
}

.content a.button .side-nav-label,
.content button.button .side-nav-label,
.order-view-actions a.button .side-nav-label {
    line-height: 1.2;
}

/* View page action bars */
.order-view-actions,
.page-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

.order-view-actions form,
.page-actions form {
    display: inline-flex;
    margin: 0;
}

@media (max-width: 640px) {
    .content a.button,
    .content button.button,
    .content input.button,
    .content input[type="submit"],
    .content button[type="submit"]:not(.dt-button):not(.ui-button) {
        width: 100%;
        justify-content: center;
    }

    .content > a.button.float-right,
    .content > .button.float-right {
        float: none;
        display: flex;
        width: 100%;
        margin-left: 0;
    }

    td.actions a,
    td.actions form {
        display: inline-flex;
        margin-bottom: 0.25rem;
    }

    .order-view-actions {
        justify-content: stretch;
    }

    .order-view-actions a.button,
    .order-view-actions form {
        width: 100%;
    }

    .order-view-actions form a.button,
    .order-view-actions form button,
    .order-view-actions form input[type="submit"] {
        width: 100%;
    }
}
