/* Minimal site stylesheet to modernize layout and integrate with Bootstrap-like spacing */
body {
    background-color: #f3f4f6;
    font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #222;
}
.container-centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
}
.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    padding: 24px;
    width: 100%;
}
/* Override max-width for login/connection pages only */
.container-centered .card {
    max-width: 520px;
}
.form-row { margin-bottom: 12px; }
.btn-primary {
    background-color: #0d6efd;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
}
.small-muted { font-size: 0.85rem; color: #6c757d; }
.logo { max-width: 220px; height: auto; display:block; margin: 0 auto 12px; }
.status-list { font-size: 0.9rem; }
.status-list dt { font-weight: 600; }
.status-list dd { margin-left: 0; margin-bottom: 6px; }

/* Logo drop shadow - replaces AjaxControlToolkit DropShadowExtender */
.logo-shadow {
    filter: drop-shadow(0px 0px 15px rgba(0, 0, 0, 0.5));
}

/* Full-width breakout section */
.full-width-breakout {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

/* Mobile-friendly responsive utilities */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }

    .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    h2 {
        font-size: 1.5rem;
    }

    h6, .h6 {
        font-size: 1rem;
    }

    /* Make images responsive */
    img {
        max-width: 100%;
        height: auto;
    }

    /* Add padding to login page container on mobile/tablet */
    .container-centered {
        padding: 16px 12px 0 12px;
    }

    /* Allow login card to use more width on tablets */
    .container-centered .card {
        max-width: 90%;
    }

    /* Stack columns on mobile */
    .card {
        margin-bottom: 15px;
    }

    /* Reduce padding on cards for mobile */
    .card-body {
        padding: 15px;
    }

    /* Make tables scrollable on mobile */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Hide or adjust large images on mobile */
    .logo-shadow {
        max-width: 150px;
    }

    /* Smaller buttons on mobile */
    .btn {
        padding: 8px 12px;
        font-size: 14px;
    }

    /* Progress indicators on mobile - allow scroll if needed */
    .d-flex.justify-content-between {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 576px) {
    /* Extra small devices (phones) */
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }

    /* Add padding to login page container on mobile */
    .container-centered {
        padding: 20px 16px 0 16px;
    }

    /* Allow login card to use full width on mobile */
    .container-centered .card {
        max-width: 100%;
    }

    .card {
        padding: 12px;
    }

    /* Make progress indicators smaller on very small screens */
    .img-thumbnail {
        max-width: 60px;
    }

    .small {
        font-size: 0.7rem;
    }
}

/* Centered iframe modal styling */
#query {
    border-radius: 8px;
    max-height: 90vh; /* Prevent modal from being taller than viewport on small screens */
}

/* Responsive height adjustments for query modal */
@media (max-width: 576px) {
    #query {
        height: 420px !important; /* Increased height for mobile to prevent scrolling */
        max-height: 90vh;
        width: 95% !important; /* Use more screen width on mobile */
    }
}

/* Modal backdrop - shown when query iframe is visible */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    display: none;
}

.modal-backdrop.show {
    display: block;
}

