/**
 * MR Web Submission Interface Styles
 */

/* Required field indicator */
.required:after {
    content: " *";
    color: #dc3545;
    font-weight: bold;
}

/* Loading overlay */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.loading-overlay .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Card styling */
.card {
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.card-header {
    border-radius: 0.5rem 0.5rem 0 0 !important;
}

/* Form controls */
.form-control-lg {
    font-size: 1.25rem;
    padding: 0.75rem 1rem;
}

.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Meter info section */
#meter-info-section {
    animation: slideDown 0.3s ease-in-out;
}

#threshold-section {
    animation: slideDown 0.3s ease-in-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Threshold warning */
.alert {
    border-radius: 0.375rem;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

/* Badges */
.badge {
    padding: 0.35em 0.65em;
    font-size: 0.875em;
}

/* Buttons */
.btn {
    border-radius: 0.375rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
}

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #004085;
}

/* Table styling */
.table {
    margin-bottom: 0;
}

.table th {
    border-top: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
    color: #6c757d;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

/* Accordion styling */
.accordion-button:not(.collapsed) {
    background-color: #e7f3ff;
    color: #0056b3;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: #80bdff;
}

/* Success page animations */
.fa-check-circle {
    animation: scaleIn 0.5s ease-in-out;
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Test environment banner */
.test-environment-banner {
    background-color: #ffc107;
    color: #000;
    text-align: center;
    padding: 0.5rem;
    font-weight: bold;
    position: sticky;
    top: 0;
    z-index: 1030;
}

/* Pagination */
.pagination {
    margin-bottom: 0;
}

.page-link {
    color: #007bff;
}

.page-link:hover {
    color: #0056b3;
}

.page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
}

/* Tooltips */
.tooltip-inner {
    max-width: 300px;
    text-align: left;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }

    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }

    .form-control-lg {
        font-size: 1rem;
        padding: 0.5rem 0.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h4 {
        font-size: 1.25rem;
    }
}

/* Print styles */
@media print {
    .btn,
    nav,
    footer,
    .no-print,
    .test-environment-banner {
        display: none !important;
    }

    .card {
        border: 1px solid #000 !important;
        box-shadow: none !important;
        page-break-inside: avoid;
    }

    .card-header {
        background-color: #f8f9fa !important;
        color: #000 !important;
    }
}

/* Utility classes */
.text-primary {
    color: #007bff !important;
}

.text-success {
    color: #28a745 !important;
}

.text-danger {
    color: #dc3545 !important;
}

.text-warning {
    color: #ffc107 !important;
}

.text-muted {
    color: #6c757d !important;
}

/* Custom spacing */
.mb-4 {
    margin-bottom: 1.5rem !important;
}

.mt-4 {
    margin-top: 1.5rem !important;
}

.py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
}

/* Footer */
footer {
    background-color: #f8f9fa;
    padding: 1rem 0;
    margin-top: 3rem;
    border-top: 1px solid #dee2e6;
}
