/* Existing styles... */
.upload-zone {
    border: 2px dashed var(--bs-secondary);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.upload-zone.dragover {
    border-color: var(--bs-primary);
    background-color: rgba(var(--bs-primary-rgb), 0.1);
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.upload-icon {
    width: 48px;
    height: 48px;
    stroke: var(--bs-secondary);
}

.file-input {
    display: none;
}

.results-panel {
    position: sticky;
    top: 1rem;
}

.results-text {
    background-color: var(--bs-dark);
    padding: 1rem;
    border-radius: 4px;
    white-space: pre-wrap;
    max-height: 300px;
    overflow-y: auto;
}

.result-item {
    border-bottom: 1px solid var(--bs-secondary);
    padding: 0.75rem 0;
}

.result-item:last-child {
    border-bottom: none;
}

.result-title {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.result-url-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.result-url {
    word-break: break-all;
    flex: 1;
    min-width: 200px;
}

.find-similar-btn {
    white-space: nowrap;
    min-width: 100px;
}

.result-score {
    font-size: 0.875rem;
    color: var(--bs-secondary);
    margin-top: 0.25rem;
}

/* File name display styles */
#file-name-display {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
    border: 1px solid var(--bs-primary);
    border-radius: 4px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--bs-primary);
    text-align: center;
}

#file-name-display::before {
    content: '📄 ';
    margin-right: 0.5rem;
}

/* API Key validation styles */
.form-control.is-invalid {
    border-color: var(--bs-danger);
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-valid {
    border-color: var(--bs-success);
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control:focus {
    box-shadow: none;
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-danger-rgb), 0.25);
}

.form-control.is-valid:focus {
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-success-rgb), 0.25);
}

/* Loading animation styles */
.loading-spinner {
    display: inline-block !important;
    width: 2rem !important;
    height: 2rem !important;
    border: 0.25rem solid rgba(255, 255, 255, 0.3) !important;
    border-top: 0.25rem solid #ffffff !important;
    border-radius: 50% !important;
    animation: spin 0.75s linear infinite !important;
    background: transparent !important;
}

/* Override any Bootstrap spinner styles */
.loading-overlay .spinner-border,
.loading-overlay .loading-spinner {
    display: inline-block !important;
    width: 2rem !important;
    height: 2rem !important;
    border: 0.25rem solid rgba(255, 255, 255, 0.3) !important;
    border-top: 0.25rem solid #ffffff !important;
    border-radius: 50% !important;
    animation: spin 0.75s linear infinite !important;
    background: transparent !important;
    vertical-align: unset !important;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
    border-radius: 4px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-text {
    color: var(--bs-light);
    font-size: 1rem;
    margin-top: 0.5rem;
}

/* Responsive adjustments */
@media (min-width: 768px) {
    .results-panel {
        height: calc(100vh - 2rem);
        overflow-y: auto;
    }
}

.get-api {
    font-style: italic;
    font-size: 0.8em;  /* Adjust the size as needed */
}

.get-api a {
    color: inherit;  /* Inherit the color from the parent element */
    text-decoration: none;  /* Optional: remove underline if desired */
}