/* ==========================================================================
   val-dialogs.css
   Shared styles for the modernized dialog layout used across:
   - AddOrEditValuation (valuation dialog)
   - AddOrEditValuationObject (legal entity dialog)
   - RollForwardSettings
   - Scenario rename dialog
   - AuditCommentDialog
   - TaskDialog

   All of these dialogs share the same header / body / footer shell:

     <div class="val-dialog">
         <header class="val-header"> ... </header>
         <div class="val-body"> ... </div>
         <footer class="val-footer"> ... </footer>
     </div>

   Load this file once globally (e.g. referenced in your host page / MainLayout,
   or via CSS isolation bundling) instead of pasting a <style> block into each
   .razor file.
   ========================================================================== */

/* ---- Dialog shell ---- */

.val-dialog {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    width: 100%;
}

/* ---- Header ---- */

.val-header {
    padding: 1.75rem 2rem 1.5rem;
    border-bottom: 1px solid var(--rz-border-color, #e5e7eb);
}

.val-header-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.val-header-icon {
    font-size: 1.85rem;
    color: var(--rz-primary, #2196f3);
}

.val-header-title h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.val-header-title p {
    margin: 0.3rem 0 0;
    font-size: 0.9rem;
    color: var(--rz-text-secondary-color, #6b7280);
}

/* ---- Body & section cards ---- */

.val-body {
    overflow-y: auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    flex: 1 1 auto;
}

.val-section {
    background: var(--rz-base-100, #f9fafb);
    border: 1px solid var(--rz-border-color, #e5e7eb);
    border-radius: 12px;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.val-section-title {
    margin: 0 0 0.25rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--rz-text-secondary-color, #6b7280);
}

/* ---- Field layout helpers ---- */

.val-field {
    width: 100%;
}

.val-field-row {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    align-items: flex-start;
}

.val-field-row > * {
    flex: 1 1 240px;
}

.val-field-spacer {
    visibility: hidden;
}

.val-field-with-note {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 1 1 240px;
}

/* ---- Inline notes (e.g. roll-forward warnings/recommendations) ---- */

.val-note {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.15rem 0;
}

.val-note-warning {
    color: #b45309;
}

.val-note-recommended {
    color: #15803d;
}

/* ---- Attachment row (audit comment dialog) ---- */

.val-attachment {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    background: white;
    border: 1px solid var(--rz-border-color, #e5e7eb);
    border-radius: 8px;
    padding: 0.85rem 1rem;
}

.val-attachment-info {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
}

.val-attachment-name {
    font-weight: 600;
    font-size: 0.88rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.val-attachment-empty {
    font-style: italic;
    font-size: 0.88rem;
    color: var(--rz-text-secondary-color, #6b7280);
}

.val-attachment-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.val-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 0.8rem;
    color: var(--rz-text-secondary-color, #6b7280);
}

.val-hint .rz-icon {
    font-size: 1.1rem;
    color: #a3a3a3;
    flex-shrink: 0;
}

/* ---- Add-user row (valuation dialog) ---- */

.val-add-user {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 0.25rem;
}

.val-grid {
    border-radius: 8px;
    overflow: hidden;
}

/* ---- Progress state (roll-forward dialog) ---- */

.val-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 3rem 0;
    color: var(--rz-text-secondary-color, #6b7280);
}

/* ---- Footer ---- */

.val-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 2rem;
    border-top: 1px solid var(--rz-border-color, #e5e7eb);
    background: var(--rz-base-50, #fff);
    margin-top: auto;
}

.val-footer-note {
    font-size: 0.9rem;
    color: var(--rz-text-secondary-color, #6b7280);
}

/* ---- Radzen form field label spacing override ----
   Radzen's default label sits almost flush against the input; give it
   proper breathing room and slightly bolder weight across all val-dialogs. */

.val-dialog .rz-form-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.val-dialog .rz-form-field .rz-form-field-label,
.val-dialog .rz-form-field label {
    margin-bottom: 0.4rem;
    font-weight: 600;
    font-size: 0.85rem;
}

/* ---- Empty state (documentation overview) ---- */

.val-empty-state {
    align-items: center;
    text-align: center;
    padding: 3rem 2rem;
    gap: 0.75rem;
}

.val-empty-icon {
    font-size: 2.5rem;
    color: #a3a3a3;
}

.val-empty-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
}

.val-empty-text {
    margin: 0;
    max-width: 420px;
    font-size: 0.9rem;
    color: var(--rz-text-secondary-color, #6b7280);
}

.val-empty-example {
    margin-top: 0.75rem;
}

/* ---- Switch row (duplicate peer group dialog) ---- */

.val-switch-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.val-switch-row-spread {
    justify-content: space-between;
}