/* ===================================
   DocQ Lease Agreement Extractor
   Base Styles & Layout
   =================================== */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f5f9ff;
    line-height: 1.6;
}

/* Main Container */
.container {
    width: 100vw;
    min-height: 100vh;
    background-color: white;
    transition: transform 0.3s ease;
}

.container.sidebar-open {
    transform: translateX(-350px);
}

/* Header */
.header {
    background-color: #002855;
    color: white;
    padding: 4px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1000;
}

.logo {
    width: 24px;
    height: 24px;
    background: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjE2IiBoZWlnaHQ9IjIxNiIgdmlld0JveD0iMCAwIDIxNiAyMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxjaXJjbGUgY3g9IjEwOCIgY3k9IjEwOCIgcj0iMTA4IiBmaWxsPSIjMTU5N0Y0Ii8+CjxyZWN0IHg9IjUyIiB5PSI1MiIgd2lkdGg9IjY0IiBoZWlnaHQ9IjY0IiByeD0iMTIiIGZpbGw9IndoaXRlIi8+CjxjaXJjbGUgY3g9IjE2OCIgY3k9IjE2OCIgcj0iMjQiIGZpbGw9IiMxNTk3RjQiLz4KPC9zdmc+') no-repeat center;
    background-size: contain;
    flex-shrink: 0;
}

.header-title {
    font-size: 13px;
    font-weight: 500;
    margin: 0;
    letter-spacing: 0.2px;
}

.header-subtitle {
    font-size: 11px;
    opacity: 0.7;
    margin-left: auto;
    font-weight: 400;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.gear-icon {
    width: 20px;
    height: 20px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gear-icon:hover {
    opacity: 1;
    transform: rotate(90deg);
}

.gear-icon svg {
    width: 16px;
    height: 16px;
    fill: white;
}

/* Utility Classes */
.hidden {
    display: none;
}

.show {
    display: block;
}

/* Loading Overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #002855;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes expandRow {
    from { opacity: 0; transform: scaleY(0); }
    to { opacity: 1; transform: scaleY(1); }
}

@keyframes contractRow {
    from { opacity: 1; transform: scaleY(1); }
    to { opacity: 0; transform: scaleY(0); }
}

/* Responsive Header */
@media (max-width: 768px) {
    .header-subtitle {
        display: none;
    }
    .header {
        padding: 4px 12px;
    }
}
