/* ============================================================
   OLD BLINKR LAYOUT FIXES - BETTER SPACE UTILIZATION
   Matches the layout structure from www.blinkrquotes.com
   ============================================================ */

:root[data-theme="old-blinkr"] {
    /* Override restrictive max-widths for better space usage */
}

/* ============================================================
   CONTAINER WIDTHS - Match old BlinkR
   ============================================================ */

/* Main content area - use full width with reasonable max */
:root[data-theme="old-blinkr"] .app-main-inner,
:root[data-theme="old-blinkr"] .control-company,
:root[data-theme="old-blinkr"] .panel {
    max-width: 1200px !important; /* Wider than current 1320px */
    margin: 0 auto !important;
    padding: 24px !important;
}

/* Forms should use more width */
:root[data-theme="old-blinkr"] .company-form,
:root[data-theme="old-blinkr"] form {
    max-width: 100% !important;
    width: 100% !important;
}

/* ============================================================
   FORM LAYOUTS - Better Space Utilization
   ============================================================ */

/* Form rows should use available width */
:root[data-theme="old-blinkr"] .form-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 16px;
    align-items: start;
    margin-bottom: 16px;
    width: 100%;
}

/* Labels on the left */
:root[data-theme="old-blinkr"] .form-row label {
    text-align: right;
    padding-top: 10px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Inputs use remaining space - NO max-width constraint! */
:root[data-theme="old-blinkr"] .form-row input,
:root[data-theme="old-blinkr"] .form-row select,
:root[data-theme="old-blinkr"] .form-row textarea {
    width: 100% !important;
    max-width: 600px !important; /* Reasonable limit but much wider than 360px */
    min-width: 300px;
}

/* Small text under inputs */
:root[data-theme="old-blinkr"] .form-row small {
    grid-column: 2;
    color: var(--text-muted);
    font-size: 12px;
    margin-top: -12px;
}

/* ============================================================
   SPECIAL FORM LAYOUTS
   ============================================================ */

/* Logo row uses different layout */
:root[data-theme="old-blinkr"] .company-logo-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
    margin-bottom: 24px;
}

:root[data-theme="old-blinkr"] .company-logo-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

:root[data-theme="old-blinkr"] .company-logo-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    background: var(--bg-darkest);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 16px;
}

/* Profile toggle buttons */
:root[data-theme="old-blinkr"] .company-profile-toggle {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
    padding: 16px;
    background: var(--bg-surface-soft);
    border-radius: 8px;
    align-items: center;
}

:root[data-theme="old-blinkr"] .company-profile-toggle label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-primary);
}

:root[data-theme="old-blinkr"] .company-profile-toggle small {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 12px;
}

/* ============================================================
   FORM ACTIONS - Button Row
   ============================================================ */

:root[data-theme="old-blinkr"] .form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-subtle);
}

:root[data-theme="old-blinkr"] .status-message {
    margin-left: 16px;
    font-size: 14px;
    color: var(--text-secondary);
}

/* ============================================================
   SECTIONS & HEADERS
   ============================================================ */

:root[data-theme="old-blinkr"] .panel h2,
:root[data-theme="old-blinkr"] .control-company h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

:root[data-theme="old-blinkr"] .panel > p,
:root[data-theme="old-blinkr"] .control-company > p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 14px;
}

:root[data-theme="old-blinkr"] .panel h3,
:root[data-theme="old-blinkr"] .control-company h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 32px;
    margin-bottom: 8px;
}

:root[data-theme="old-blinkr"] .panel hr,
:root[data-theme="old-blinkr"] .control-company hr {
    border: none;
    border-top: 1px solid var(--border-subtle);
    margin: 32px 0;
}

/* ============================================================
   RESPONSIVE - Stack on smaller screens
   ============================================================ */

@media (max-width: 768px) {
    :root[data-theme="old-blinkr"] .form-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    :root[data-theme="old-blinkr"] .form-row label {
        text-align: left;
        padding-top: 0;
    }

    :root[data-theme="old-blinkr"] .form-row small {
        grid-column: 1;
        margin-top: 4px;
    }

    :root[data-theme="old-blinkr"] .company-logo-row {
        grid-template-columns: 1fr;
    }

    :root[data-theme="old-blinkr"] .company-profile-toggle {
        flex-direction: column;
        align-items: flex-start;
    }

    :root[data-theme="old-blinkr"] .company-profile-toggle small {
        margin-left: 0;
    }
}

/* ============================================================
   TABLES - Use more horizontal space
   ============================================================ */

:root[data-theme="old-blinkr"] .data-table,
:root[data-theme="old-blinkr"] table {
    width: 100% !important;
    max-width: 100% !important;
}

/* ============================================================
   CONTROL CENTER GRID - Better spacing
   ============================================================ */

:root[data-theme="old-blinkr"] .control-center-grid,
:root[data-theme="old-blinkr"] .module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

:root[data-theme="old-blinkr"] .module-card {
    min-height: 140px;
    padding: 20px;
}
