/* All styles scoped to #sff_container to avoid conflicts */

/* Base container and layout */
#sff_container {
    box-sizing: border-box;
	width:75%;
	margin: 0 auto;
}

#sff_container * {
    box-sizing: border-box;
}

#sff_container .container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

#sff_container .mt-5 {
    margin-top: 3rem;
}

#sff_container .row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
    align-items: flex-end;
}

#sff_container .col-md-6 {
    position: relative;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    flex: 0 0 50%;
    max-width: 50%;
}

#sff_container .d-flex {
    display: flex;
}

#sff_container .align-items-end {
    align-items: flex-end;
}

#sff_container .mb-3 {
    margin-bottom: 1rem;
}

#sff_container .mb-0 {
    margin-bottom: 0;
}

#sff_container .me-2 {
    margin-right: 0.5rem;
}

#sff_container .ms-2 {
    margin-left: 0.5rem;
}

#sff_container .w-100 {
    width: 100%;
}

#sff_container .text-center {
    text-align: center;
}

#sff_container .text-muted {
    color: #6c757d;
}

#sff_container .small {
    font-size: 0.875rem;
}

/* Typography */
#sff_container h2 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: 500;
    line-height: 1.2;
    font-size: 2rem;
    text-align: center;
}

#sff_container h5 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: 500;
    line-height: 1.2;
    font-size: 1.25rem;
}

#sff_container h6 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.2;
    font-size: 1rem;
}

#sff_container p {
    margin-top: 0;
    margin-bottom: 1rem;
}

#sff_container ul {
    margin-top: 0;
    margin-bottom: 1rem;
    padding-left: 2rem;
}

#sff_container li {
    display: list-item;
}

#sff_container .lead {
    font-size: 1.25rem;
    font-weight: 300;
}

/* Forms */
#sff_container .form-label {
    margin-bottom: 0.5rem;
    font-weight: 700;
    display: block;
}

#sff_container .form-control {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    background-image: none;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

#sff_container .form-control:focus {
    color: #212529;
    background-color: #fff;
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

#sff_container .form-control-lg {
    padding: 0.5rem 1rem;
    font-size: 1.25rem;
    border-radius: 0.3rem;
    height: calc(1.5em + 1rem + 2px);
}

#sff_container select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* Buttons */
#sff_container .btn {
    display: inline-block;
    font-weight: 400;
    color: #212529;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    background-color: transparent;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    text-decoration: none;
}

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

#sff_container .btn-primary:hover {
    color: #fff;
    background-color: #0069d9;
    border-color: #0062cc;
}

#sff_container .btn-primary:focus {
    color: #fff;
    background-color: #0069d9;
    border-color: #0062cc;
    box-shadow: 0 0 0 0.2rem rgba(38, 143, 255, 0.5);
}

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

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

#sff_container .btn-lg {
    padding: 0.5rem 1rem;
    font-size: 1.25rem;
    border-radius: 0.3rem;
    height: calc(1.5em + 1rem + 2px);
}

#sff_container .btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Progress bars */
#sff_container .progress {
    display: flex;
    height: 1rem;
    overflow: hidden;
    font-size: 0.75rem;
    background-color: #e9ecef;
    border-radius: 0.25rem;
}

#sff_container .progress-bar {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    background-color: #007bff;
    transition: width 0.6s ease;
}

#sff_container .progress-bar-striped {
    background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
    background-size: 1rem 1rem;
}

#sff_container .progress-bar-animated {
    animation: sff-progress-bar-stripes 1s linear infinite;
}

@keyframes sff-progress-bar-stripes {
    0% {
        background-position-x: 1rem;
    }
}

/* Spinner */
#sff_container .spinner-border {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    vertical-align: text-bottom;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: sff-spinner-border 0.75s linear infinite;
}

#sff_container .spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.2em;
}

@keyframes sff-spinner-border {
    to {
        transform: rotate(360deg);
    }
}

/* Modal styles */
#sff_container .modal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
    display: none;
    width: 100%;
    height: 100%;
    overflow: hidden;
    outline: 0;
}

#sff_container .modal.show {
    display: block;
}

#sff_container .modal.d-block {
    display: block;
}

#sff_container .modal-dialog {
    position: relative;
    width: auto;
    margin: 0.5rem;
    pointer-events: none;
    max-width: 500px;
    margin: 1.75rem auto;
    display: flex;
    align-items: center;
    min-height: calc(100% - 1rem);
}

#sff_container .modal-lg {
    max-width: 800px;
}

#sff_container .modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 0.3rem;
    outline: 0;
}

#sff_container .modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1rem 1rem;
    border-bottom: 1px solid #dee2e6;
    border-top-left-radius: calc(0.3rem - 1px);
    border-top-right-radius: calc(0.3rem - 1px);
}

#sff_container .modal-title {
    margin-bottom: 0;
    line-height: 1.5;
    font-size: 1.25rem;
}

#sff_container .modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: 1rem;
    text-align: center;
}

#sff_container .modal-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    padding: 0.75rem;
    border-top: 1px solid #dee2e6;
    border-bottom-right-radius: calc(0.3rem - 1px);
    border-bottom-left-radius: calc(0.3rem - 1px);
}

#sff_container #status-output {
    width: 80%;
    height: 350px;
    overflow-y: auto;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 15px;
    font-family: monospace;
    font-size: 13px;
    text-align: left;
    margin: 0 auto;
    border-radius: 8px;
}

/* Upload progress overlay */
#sff_container .upload-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    display: fixed;
    align-items: center;
    justify-content: center;
    z-index: 1060;
}

#sff_container .upload-progress-box {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 25px 35px;
    width: 50%;
    max-width: 400px;
    min-width: 300px;
    text-align: center;
}

#sff_container .upload-progress-box h6 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 15px;
}

#sff_container .upload-progress-box .progress {
    height: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
}

#sff_container .upload-progress-box .progress-bar {
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}

#sff_container .upload-progress-box .progress-bar-striped {
    background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
    background-size: 1rem 1rem;
}

#sff_container .upload-progress-box .progress-bar-animated {
    animation: sff-upload-progress-stripes 1s linear infinite;
}

@keyframes sff-upload-progress-stripes {
    0% {
        background-position-x: 1rem;
    }
}

/* Processing container */
#sff_container #processing-container {
    display: none;
}

/* Main upload page specific styles */
#sff_container .file-info {
    background-color: #e3f2fd;
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
    text-align: left;
}

#sff_container .upload-area {
    border: 2px dashed #007bff;
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 20px;
}

#sff_container .upload-area:hover {
    background-color: #e3f2fd;
    border-color: #0056b3;
}

#sff_container .upload-area.dragover {
    background-color: #cce7ff;
    border-color: #004085;
}

#sff_container .upload-area.has-file {
    background-color: #d4edda;
    border-color: #28a745;
}

#sff_container #fit_file {
    display: none;
}