/* Validation Styles */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

/* Error UI */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.3rem 0.75rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,...) no-repeat 1rem/1.8rem, #b32121;
    padding: 0.75rem 0.75rem 0.75rem 3.5rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred.";
    }

/* Loading Progress */
.loading-progress {
    position: relative;
    display: block;
    width: 5rem;
    height: 5rem;
    margin: 15vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.4rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(15vh + 1.75rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

/* Code Highlighting */
code {
    color: #c02d76;
}

/* Body Background */
body {
    background-color: #f4f6f8;
}

/* Card Styles */
.card {
    border-radius: 8px;
    box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.08);
    padding: 0.7rem;
    background-color: white;
}

/* Card Header */
.card-header {
    font-size: 1.2rem;
    font-weight: bold;
    background-color: #007bff;
    color: white;
    padding: 0.6rem;
    border-radius: 8px 8px 0 0;
}

/* Form Controls */
.form-control, .form-select {
    font-size: 0.8rem;
    padding: 0.35rem 0.7rem;
    border-radius: 4px;
    border: 1px solid #ced4da;
}

    .form-control:focus, .form-select:focus {
        border-color: #007bff;
        box-shadow: 0 0 3px rgba(0, 123, 255, 0.25);
    }

/* Button Styles */
.btn {
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
    border-radius: 4px;
    font-weight: bold;
}

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn-success {
    background-color: #28a745;
    border-color: #28a745;
}

.btn-info {
    background-color: #17a2b8;
    border-color: #17a2b8;
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn:hover {
    opacity: 0.9;
}

/* Panels Section */
#panels-section {
    padding: 0.6rem;
    margin-top: 0.6rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #f9f9f9;
}

    /* Specific styles for the Added Components section */
    #panels-section .table-sm th,
    #panels-section .table-sm td {
        padding: 0.25rem; /* Reduce padding */
        font-size: 0.7rem; /* Smaller font size for added components */
    }

    #panels-section .input-group {
        max-width: 80px; /* Limit the width of input fields */
    }

    #panels-section .input-group-sm input[type="number"] {
        font-size: 0.75rem; /* Smaller font size for input fields */
        padding: 0.25rem; /* Reduce padding inside input fields */
        max-width: 40px; /* Adjust the width of quantity input */
    }

    #panels-section .input-group-sm .btn {
        padding: 0.25rem 0.5rem; /* Reduce padding inside buttons */
        font-size: 0.75rem; /* Smaller font size for buttons */
    }

    #panels-section .btn-danger {
        font-size: 0.75rem; /* Smaller font size for delete button */
        padding: 0.25rem 0.5rem; /* Reduce padding */
        width: 35px; /* Limit button width for consistency */
    }

    /* General adjustments to tighten up spacing */
    #panels-section h6 {
        font-size: 0.9rem; /* Slightly reduce heading size */
    }

    #panels-section table {
        margin-bottom: 0.5rem; /* Reduce table margin */
    }

    #panels-section .border {
        padding: 0.5rem; /* Reduce padding inside the bordered panel */
    }

    #panels-section .row {
        margin-bottom: 0.25rem; /* Reduce row spacing */
    }


/* Table Styles */
.table {
    width: 100%;
    margin-bottom: 0.6rem;
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

.table-sm th, .table-sm td {
    vertical-align: middle;
    text-align: center;
}

.table th {
    background-color: #f8f9fa;
    font-weight: bold;
    padding: 0.4rem;
}

.table-bordered .panel-name-row th {
    background-color: #9ab8b5 !important;
}

/* Container Adjustments */
.container-fluid {
    padding: 1rem 0;
}

h3, h4 {
    font-weight: bold;
    margin-bottom: 0.75rem;
    text-align: center;
    font-size: 1rem;
}

/* Responsive Adjustments */
@media (min-width: 1080px) {
    .row .col-md-8, .row .col-md-10, .row .col-md-12 {
        max-width: 40%;
    }
}

/* Input Group Centering */
.input-group {
    margin: 0 auto;
}

/* Checkbox Alignment */
input[type="checkbox"] {
    margin: auto;
}

.text-right {
    text-align: right !important;
}

.text-center {
    text-align: center !important;
}

.d-flex {
    gap: 0.6rem;
}

/* General Container Styles */
#formToExport {
    padding: 1rem;
    background-color: #ffffff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-width: 80%;
}

    #formToExport table {
        width: 100%;
        table-layout: fixed;
        word-wrap: break-word;
    }

    #formToExport th, #formToExport td {
        font-size: 0.8rem;
        padding: 0.5rem;
        vertical-align: middle;
    }

    /* Center headings (both horizontally and vertically) */
    #formToExport th {
        background-color: #9ab8b5;
        font-weight: bold;
        text-align: center;
        vertical-align: middle;
    }


    /* Panel Header Font Size */
    #formToExport .panel-name-row th {
        font-size: 1rem;
        padding: 0.6rem;
    }

/* Responsive Adjustments for Wider Screens */
@media (min-width: 1080px) {
    #formToExport {
        max-width: 90%;
    }
}

/* Input Elements within the Form to Export */
#formToExport input[type="text"],
#formToExport input[type="date"],
#formToExport input[type="checkbox"] {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    padding: 0.25rem; /* Adjust padding as needed */
    margin: 0; /* Remove any default margins */
}

#formToExport .form-control {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    padding: 0.25rem;
}

#formToExport td {
    overflow: hidden;
}

/* Remove any box-shadow that might affect the background */
#formToExport td,
#formToExport th {
    box-shadow: none;
}

/* Remove any existing hover effect from the entire row */
#formToExport tbody tr.question-row {
    background-color: inherit;
}

    /* Apply hover effect to 'td's with class 'highlightable' when their parent 'tr' is hovered */
    #formToExport tbody tr.question-row:hover td.highlightable {
        background-color: #e6f7ff;
    }

/* Hide number input arrows */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield; /* Firefox */
}