﻿body {

}

/* Accessible button colours: Bootstrap's stock primary and success blues and
   greens fail 4.5:1 with their text. #0069d9 is the app's single accent token,
   shared with .ros-section-title. */

.btn-primary {
    background-color: #0069d9;
    border-color: #0069d9;
}

.btn-outline-primary {
    color: #0069d9;
    border-color: #0069d9;
}

.btn-success {
    background-color: #1e7e34;
    border-color: #1e7e34;
}

.btn-outline-success {
    color: #1f7a33;
}

.btn-outline-secondary {
    color: #6b7177;
}

/* white text on #117a8b passes for solid; #117a8b on white passes for outline */
.btn-info {
    background-color: #117a8b;
    border-color: #117a8b;
}

.btn-outline-info {
    color: #117a8b;
    border-color: #117a8b;
}

/* Bootstrap 4 dropped the Bootstrap 3 `.control-label` class that ~1,600 labels
   still use - alias it to the BS4 `.col-form-label` styling so labels sit
   correctly beside their inputs while pages are migrated. */
.control-label {
    padding-top: calc(.375rem + 1px);
    padding-bottom: calc(.375rem + 1px);
    margin-bottom: 0;
    font-size: inherit;
    line-height: 1.5;
}

/*-------------------------------------------------------------*/
/* Action button pattern
   -------------------------------------------------------------
   One mapping for every action row, so colour means something:
   red is destructive, blue acts, grey is neutral navigation.

     New / Save / Submit / OK .. btn btn-primary            (the action)
     Delete .................. btn btn-outline-danger       (destructive)
     Refresh / Back / Cancel .. btn btn-outline-secondary   (neutral)
     Search .................. btn btn-outline-success      (kept distinct)
     row-level "open record" .. grid SelectText="Open"      (not a button)

   Actions live in a .ros-actions row: primary action first, neutral
   actions after it, destructive action last so it is never the button
   a user's cursor lands on by default. Do not use btn-outline-danger
   for New/Refresh/Back - that made red the action colour app-wide. */
/* Section headings: one accent token instead of per-element ForeColor values
   (the old #0099FF / #3399FF / #33CC33 / #FF6600 accents all failed contrast on white). */
.ros-section-title {
    color: #0069d9;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.ros-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.ros-actions .btn {
    margin: 0 !important;
}

/* Toolbar that sits above a grid: search, filters, result count. */
.ros-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem;
    padding: 0.75rem;
    margin-bottom: 1rem;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.375rem;
}

.ros-toolbar .form-group,
.ros-toolbar .form-inline {
    margin-bottom: 0;
}

.ros-result-count {
    color: #6c757d;
    font-size: 0.875rem;
}

/*-------------------------------------------------------------*/
/* Feedback: toasts + busy overlay (see Scripts/ros-toast.js)
   -------------------------------------------------------------
   Replaces the blocking alert() that ASP_MsgBox used to emit. Toast
   colours reuse the Bootstrap semantic palette so the type means the
   same thing as it does on buttons: green = done, red = problem,
   amber = confirm/be careful. */
.ros-toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: min(420px, calc(100vw - 2rem));
    pointer-events: none;
}

.ros-toast {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: 1px solid transparent;
    border-left-width: 4px;
    border-radius: 0.375rem;
    background-color: #fff;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.15);
    color: #212529;
    font-size: 0.9375rem;
    pointer-events: auto;
    opacity: 1;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.ros-toast-hide {
    opacity: 0;
    transform: translateX(0.75rem);
}

.ros-toast-body {
    flex: 1 1 auto;
    word-break: break-word;
}

.ros-toast-close {
    flex: 0 0 auto;
    border: 0;
    background: none;
    padding: 0 0 0 0.25rem;
    line-height: 1;
    font-size: 1.125rem;
    color: #6c757d;
    cursor: pointer;
}

.ros-toast-close:hover {
    color: #212529;
}

.ros-toast-info {
    border-left-color: #17a2b8;
}

.ros-toast-success {
    border-left-color: #28a745;
}

.ros-toast-danger {
    border-left-color: #dc3545;
}

.ros-toast-warning {
    border-left-color: #ffc107;
}

/* Full-page overlay while a long synchronous operation runs (report
   extraction). aria-live keeps screen readers informed. */
.ros-busy-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2100;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(28, 34, 54, 0.45);
}

.ros-busy-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-radius: 0.375rem;
    background-color: #fff;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.25);
    color: #212529;
}

.ros-spinner {
    display: inline-block;
    width: 1.125rem;
    height: 1.125rem;
    border: 2px solid #dee2e6;
    border-top-color: #0069d9;
    border-radius: 50%;
    animation: ros-spin 0.8s linear infinite;
}

@keyframes ros-spin {
    to {
        transform: rotate(360deg);
    }
}

/* The skip link is off-screen until focused, then lands on top of the shell. */
.ros-skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 3000;
    padding: 0.5rem 1rem;
    background-color: #212529;
    color: #fff;
}

.ros-skip-link:focus {
    left: 0;
    color: #fff;
    text-decoration: none;
}

/* Keyboard focus must stay visible: several place stylesheets set
   `outline: none`, which left keyboard users with no focus indicator. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid #0069d9;
    outline-offset: 2px;
}


/*-------------------------------------------------------------*/
/* Active menu item (N4): the section the user is currently in */
/*-------------------------------------------------------------*/
.gn-menu a.gn-active {
    background: #eaf3fc;
    box-shadow: inset 3px 0 0 #0069d9;
    color: #1a1a1a;
    font-weight: 600;
}

/*-------------------------------------------------------------*/
/* N3: FontAwesome menu icons replace the Codrops demo glyphs  */
/*-------------------------------------------------------------*/
.gn-menu a.gn-icon::before {
    content: none !important;
}
.gn-menu a.gn-icon {
    display: block;
}
.gn-menu a.gn-icon .fa {
    width: 60px;
    text-align: center;
    font-size: 17px;
    vertical-align: middle;
}

/*-------------------------------------------------------------*/
/* Dashboard carousel (MainDash): fixed-height letterboxed     */
/* slides so any aspect ratio displays without distortion      */
/*-------------------------------------------------------------*/
.ros-carousel .carousel-item {
    height: 420px;
    background-color: #343a40;
}
.ros-carousel .ros-slide-img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    margin: 0 auto;
}
@media (max-width: 767.98px) {
    .ros-carousel .carousel-item {
        height: 240px;
    }
}

/*-------------------------------------------------------------*/
/* Carousel slide thumbnail (Tools/SlideList)                  */
/*-------------------------------------------------------------*/
.ros-slide-thumb {
    display: block;
    max-width: 180px;
    max-height: 90px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/*-------------------------------------------------------------*/
/* Single user-account control in the top bar (right side):    */
/* "My Account" + user's name grouped on the left, photo/icon  */
/* vertically centered at the far right                        */
/*-------------------------------------------------------------*/
.gn-menu-main a.ros-account {
    display: flex;
    flex-direction: row;
    align-items: center;
    height: 100%;
    padding: 0 30px;
    line-height: normal;
}
.ros-account-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}
.ros-account-top {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
    color: #5f6f81;
}
.ros-account-name {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: #8a97a5;
}
.ros-account-side {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 14px;
}
.ros-account-photo {
    display: block;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}
.ros-account-side .fa {
    font-size: 20px;
    color: #5f6f81;
}
.gn-menu-main a.ros-account:hover .ros-account-top,
.gn-menu-main a.ros-account:hover .ros-account-name,
.gn-menu-main a.ros-account:hover .ros-account-side .fa {
    color: #fff;
}
