/* Custom styles for fatEDGAR */

/* Search results dropdown */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.search-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--bs-border-color);
    transition: background-color 0.15s ease-in-out;
}

.search-item:hover {
    background-color: var(--bs-secondary-bg);
}

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

/* Custom scrollbar for search results */
.search-results::-webkit-scrollbar {
    width: 6px;
}

.search-results::-webkit-scrollbar-track {
    background: var(--bs-secondary-bg);
}

.search-results::-webkit-scrollbar-thumb {
    background: var(--bs-border-color);
    border-radius: 3px;
}

.search-results::-webkit-scrollbar-thumb:hover {
    background: var(--bs-secondary-color);
}

/* Form styling improvements */
.form-control:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
}

.form-check-input:checked {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

/* Card hover effects */
.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
    transition: box-shadow 0.15s ease-in-out;
}

/* Button loading state */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Footer styling */
footer {
    font-size: 0.9rem;
}

/* Compact layout optimizations */
.container {
    max-width: 1200px;
}

.display-5 {
    font-size: 2.5rem;
    line-height: 1.1;
}

.card {
    border-radius: 0.5rem;
}

.form-label {
    font-weight: 500;
}

.form-text {
    font-size: 0.8rem;
}

/* Compact filing cards */
.filing-card {
    transition: all 0.2s ease;
}

.filing-card:hover {
    transform: translateY(-1px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .display-5 {
        font-size: 2rem;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
        margin-top: 1rem !important;
    }
    
    .card-body {
        padding: 1rem !important;
    }
    
    .col-md-6 {
        margin-bottom: 0.5rem !important;
    }
}

/* 16:9 Display optimizations */
@media (min-width: 1200px) and (min-height: 675px) {
    .container {
        min-height: calc(100vh - 2rem);
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    
    .main-content {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

/* Loading spinner animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner-border {
    animation: spin 1s linear infinite;
}

/* Alert styling */
.alert {
    border: none;
    border-radius: var(--bs-border-radius-lg);
}

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

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

/* Select All box styling */
.border-primary {
    border-color: var(--bs-primary) !important;
}

.form-check-input-lg {
    width: 1.25rem;
    height: 1.25rem;
}

.form-check-input:indeterminate {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e");
}

/* Responsive adjustments for select all box */
@media (max-width: 768px) {
    .border-primary .row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .border-primary .text-end {
        text-align: left !important;
    }
    
    .border-primary .justify-content-end {
        justify-content: flex-start !important;
    }
}
