/* Modern Zindora Manager Styling */

.card.modern-card {
    box-shadow: none;
    border-radius: var(--radius-card);
    border: 1px solid var(--color-border);
}

.nav-tabs {
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 1.5rem;
}

.nav-tabs .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    color: var(--color-text-muted);
    background: transparent;
    padding: 0.625rem 0.875rem;
    margin-right: 0;
    border-radius: 0;
    transition: background-color var(--motion-fast) ease, color var(--motion-fast) ease;
    font-weight: 600;
    position: relative;
    text-decoration: none;
    font-size: var(--text-body-size);
}

.nav-tabs .nav-link:hover {
    background: var(--color-surface-hover);
    color: var(--color-text);
}

/* Active tab: bold text plus a 2px navy underline (never colour alone). */
.nav-tabs .nav-link.active {
    background: transparent;
    color: var(--color-text);
    font-weight: 700;
    border: none;
    border-bottom: 2px solid var(--color-primary);
}

.nav-tabs .nav-link i {
    font-size: 1em;
    margin-right: 0.5rem;
}

/* Tab content styling */
.tab-pane {
    animation: fadeInUp var(--motion-fast) ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tab-container {
    background: var(--color-surface);
    border-radius: var(--radius-card);
}

.tab-content-wrapper {
    min-height: 300px;
    padding: 1rem 0;
}

.tab-navigation {
    background: var(--color-surface-muted);
    border-radius: var(--radius-card);
    padding: 1rem;
    margin-top: 1.5rem;
    border: 1px solid var(--color-border);
}

.btn-tab-nav {
    background: var(--color-primary);
    border: 1px solid var(--color-primary);
    color: var(--color-on-primary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-control);
    font-weight: 600;
    transition: background-color var(--motion-fast) ease, border-color var(--motion-fast) ease, color var(--motion-fast) ease;
    font-size: var(--text-button-size);
}

.btn-tab-nav:hover:not(:disabled) {
    background: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
    color: var(--color-on-primary);
}

.btn-tab-nav:disabled {
    background: var(--color-surface-muted);
    border-color: var(--color-border);
    color: var(--color-text-muted);
    cursor: not-allowed;
}

.step-indicator {
    background: var(--color-surface);
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-control);
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-weight: 600;
    font-size: var(--text-button-size);
}

.tab-navigation .step-indicator {
    white-space: nowrap;
}

@media (max-width: 480px) {
    /* Spanish labels are longer: drop the arrows so the step bar fits on one row (Designer, #325). */
    .tab-navigation .btn-tab-nav .bi {
        display: none;
    }
}

.btn-modern-primary {
    background: var(--color-primary);
    border: 1px solid var(--color-primary);
    color: var(--color-on-primary);
    font-weight: 600;
    border-radius: var(--radius-control);
    transition: background-color var(--motion-fast) ease, border-color var(--motion-fast) ease, color var(--motion-fast) ease;
    padding: 0.5rem 1rem;
    font-size: var(--text-button-size);
}

.btn-modern-primary:hover:not(:disabled) {
    background: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
    color: var(--color-on-primary);
}

.btn-modern-success {
    background: var(--color-success);
    border: 1px solid var(--color-success);
    color: var(--color-on-primary);
    font-weight: 600;
    border-radius: var(--radius-control);
    transition: background-color var(--motion-fast) ease, border-color var(--motion-fast) ease, color var(--motion-fast) ease;
    padding: 0.5rem 1rem;
    font-size: var(--text-button-size);
}

.btn-modern-success:hover:not(:disabled) {
    background: var(--color-success-hover);
    border-color: var(--color-success-hover);
    color: var(--color-on-primary);
}

/* AI-assistant launcher buttons — kept in a distinct violet family, not gold or green,
   so "this opens an AI assistant" reads as its own visual category across the app. */
.btn-modern-ai {
    background: var(--color-ai-accent);
    border: 1px solid var(--color-ai-accent);
    color: var(--color-on-primary);
    font-weight: 600;
    border-radius: var(--radius-control);
    transition: background-color var(--motion-fast) ease, border-color var(--motion-fast) ease, color var(--motion-fast) ease;
    padding: 0.5rem 1rem;
    font-size: var(--text-button-size);
}

.btn-modern-ai:hover:not(:disabled) {
    background: var(--color-ai-accent-hover);
    border-color: var(--color-ai-accent-hover);
    color: var(--color-on-primary);
}

.btn-modern-danger {
    background: var(--color-danger);
    border: 1px solid var(--color-danger);
    color: var(--color-on-primary);
    font-weight: 600;
    border-radius: var(--radius-control);
    transition: background-color var(--motion-fast) ease, border-color var(--motion-fast) ease, color var(--motion-fast) ease;
    padding: 0.5rem 1rem;
    font-size: var(--text-button-size);
}

.btn-modern-danger:hover:not(:disabled) {
    background: var(--color-danger-hover);
    border-color: var(--color-danger-hover);
    color: var(--color-on-primary);
}

.btn-modern-secondary {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    font-weight: 600;
    border-radius: var(--radius-control);
    transition: background-color var(--motion-fast) ease, border-color var(--motion-fast) ease, color var(--motion-fast) ease;
    padding: 0.5rem 1rem;
    font-size: var(--text-button-size);
}

.btn-modern-secondary:hover:not(:disabled) {
    background: var(--color-surface-hover);
    border-color: var(--color-border);
    color: var(--color-text);
}

.btn-modern-info {
    background: var(--color-info);
    border: 1px solid var(--color-info);
    color: var(--color-on-primary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-control);
    font-size: var(--text-button-size);
    font-weight: 600;
    transition: background-color var(--motion-fast) ease, border-color var(--motion-fast) ease, color var(--motion-fast) ease;
}

.btn-modern-info:hover:not(:disabled) {
    background: var(--color-info-hover);
    border-color: var(--color-info-hover);
    color: var(--color-on-primary);
}

.btn-modern-warning {
    background: var(--color-warning);
    border: 1px solid var(--color-warning);
    color: var(--color-on-primary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-control);
    font-size: var(--text-button-size);
    font-weight: 600;
    transition: background-color var(--motion-fast) ease, border-color var(--motion-fast) ease, color var(--motion-fast) ease;
}

.btn-modern-warning:hover:not(:disabled) {
    background: var(--color-warning-hover);
    border-color: var(--color-warning-hover);
    color: var(--color-on-primary);
}

.btn-modern-light {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-control);
    font-size: var(--text-button-size);
    font-weight: 600;
    transition: background-color var(--motion-fast) ease, border-color var(--motion-fast) ease, color var(--motion-fast) ease;
}

.btn-modern-light:hover:not(:disabled) {
    background: var(--color-surface-muted);
    border-color: var(--color-border);
    color: var(--color-text);
}

.btn-modern-outline-light {
    background: transparent;
    border: 1px solid var(--color-on-primary);
    color: var(--color-on-primary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-control);
    font-size: var(--text-button-size);
    font-weight: 600;
    transition: background-color var(--motion-fast) ease, border-color var(--motion-fast) ease, color var(--motion-fast) ease;
}

.btn-modern-outline-light:hover:not(:disabled) {
    background: var(--color-surface);
    border-color: var(--color-on-primary);
    color: var(--color-text);
}

.btn-modern-outline-primary {
    background: transparent;
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-control);
    font-size: var(--text-button-size);
    font-weight: 600;
    transition: background-color var(--motion-fast) ease, border-color var(--motion-fast) ease, color var(--motion-fast) ease;
}

.btn-modern-outline-primary:hover:not(:disabled) {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-on-primary);
}

.btn-modern-outline-secondary {
    background: transparent;
    border: 1px solid var(--color-text-muted);
    color: var(--color-text-muted);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-control);
    font-size: var(--text-button-size);
    font-weight: 600;
    transition: background-color var(--motion-fast) ease, border-color var(--motion-fast) ease, color var(--motion-fast) ease;
}

.btn-modern-outline-secondary:hover:not(:disabled) {
    background: var(--color-text-muted);
    border-color: var(--color-text-muted);
    color: var(--color-on-primary);
}

.btn-modern-outline-danger {
    background: transparent;
    border: 1px solid var(--color-danger);
    color: var(--color-danger);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-control);
    font-size: var(--text-button-size);
    font-weight: 600;
    transition: background-color var(--motion-fast) ease, border-color var(--motion-fast) ease, color var(--motion-fast) ease;
}

.btn-modern-outline-danger:hover:not(:disabled) {
    background: var(--color-danger);
    border-color: var(--color-danger);
    color: var(--color-on-primary);
}

.btn-modern-outline-info {
    background: transparent;
    border: 1px solid var(--color-info);
    color: var(--color-info);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-control);
    font-size: var(--text-button-size);
    font-weight: 600;
    transition: background-color var(--motion-fast) ease, border-color var(--motion-fast) ease, color var(--motion-fast) ease;
}

.btn-modern-outline-info:hover:not(:disabled) {
    background: var(--color-info);
    border-color: var(--color-info);
    color: var(--color-on-primary);
}

/* Highlight button (spec: gold fill, navy text, gold-dark border). Gold is only used here, on the
   count pill and on the logo mark. */
.btn-modern-highlight {
    background: var(--color-accent);
    border: 1px solid var(--color-accent-hover);
    color: var(--color-on-accent);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-control);
    font-size: var(--text-button-size);
    font-weight: 600;
    transition: background-color var(--motion-fast) ease, border-color var(--motion-fast) ease;
}

.btn-modern-highlight:hover:not(:disabled) {
    background: var(--color-accent-hover);
    color: var(--color-on-accent);
}

/* Disabled buttons keep their label (say why in a hint next to them). */
.btn-modern-primary:disabled,
.btn-modern-secondary:disabled,
.btn-modern-success:disabled,
.btn-modern-ai:disabled,
.btn-modern-danger:disabled,
.btn-modern-highlight:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Small button variants */
.btn-modern-primary.btn-sm,
.btn-modern-secondary.btn-sm,
.btn-modern-success.btn-sm,
.btn-modern-ai.btn-sm,
.btn-modern-danger.btn-sm,
.btn-modern-info.btn-sm,
.btn-modern-highlight.btn-sm,
.btn-modern-warning.btn-sm,
.btn-modern-outline-primary.btn-sm,
.btn-modern-outline-secondary.btn-sm,
.btn-modern-outline-danger.btn-sm,
.btn-modern-outline-info.btn-sm {
    padding: 0.25rem 0.625rem;
    font-size: var(--text-label-size);
}

/* Metro Circle Icons */
.modern-circle-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modern-circle-icon i {
    font-size: 1.2rem;
}

.bg-modern-primary {
    background-color: var(--color-primary) !important;
}

.bg-modern-success {
    background-color: var(--color-success) !important;
}

.bg-modern-info {
    background-color: var(--color-info) !important;
}

.bg-modern-warning {
    background-color: var(--color-warning) !important;
}

/* Form fields: visible label above, 36px tall, 3:1 control border, radius 8. Focus uses the shared
   2px ring from app.css. */
.form-control,
.form-select {
    min-height: 36px;
    border-radius: var(--radius-control);
    border: 1px solid var(--color-control-border);
    font-size: var(--text-body-size);
    color: var(--color-text);
    background-color: var(--color-surface);
}

/* Checkbox, radio and switch borders need the same 3:1 as text inputs (WCAG 1.4.11); the
   decorative --bs-border-color is too light. Checked state keeps Bootstrap's primary border. */
.form-check-input {
    border-color: var(--color-control-border);
}

.form-control::placeholder {
    color: var(--color-control-border);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--color-focus);
    box-shadow: none;
}

.form-label {
    font-weight: 600;
}

/* Errors: 2px danger border plus a sentence below, never colour alone. */
.form-control.is-invalid,
.form-select.is-invalid,
.form-control.invalid {
    border: 2px solid var(--color-danger);
}

.invalid-feedback {
    color: var(--color-danger);
    font-size: var(--text-table-size);
    font-weight: 500;
}

/* One grid look: white cells, no zebra, hover tint on the whole row. Bootstrap paints cells from
   --bs-table-bg (and the striped/hover variables), so they are set here instead of per page. */
.table-modern,
.content-area .table {
    --bs-table-bg: var(--color-surface);
    --bs-table-striped-bg: var(--color-surface);
    --bs-table-hover-bg: var(--color-surface-hover);
}

.table-modern {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    /* clip rounds the corners without becoming a scroll container, so sticky cells keep working */
    overflow: clip;
    font-size: var(--text-table-size);
}

.table-modern thead th,
.content-area .table thead th {
    background: var(--card-head-bg);
    color: var(--color-text-muted);
    border: none;
    border-bottom: 1px solid var(--color-border);
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    height: 40px;
    font-size: var(--text-label-size);
}

.table-modern tbody tr {
    transition: background-color var(--motion-fast) ease;
}

.table-modern tbody tr:hover > *,
.content-area .table tbody tr:hover > * {
    --bs-table-bg-state: var(--color-surface-hover);
}

/* Row actions stay reachable while the table scrolls sideways on narrow screens.
   The cell keeps an opaque background and follows the row colour on hover. */
.table-modern .sticky-actions {
    position: sticky;
    right: 0;
    z-index: 1;
    background-color: var(--color-surface);
    box-shadow: inset 0 0 0 9999px var(--bs-table-bg-state, var(--bs-table-bg)), -2px 0 5px color-mix(in srgb, var(--brand-navy-dark) 8%, transparent);
}

.table-modern thead th.sticky-actions {
    background-color: var(--card-head-bg);
    box-shadow: -2px 0 5px color-mix(in srgb, var(--brand-navy-dark) 8%, transparent);
}

.table-modern tbody tr:hover > .sticky-actions {
    background-color: var(--color-surface-hover);
}

/* On a phone the pinned actions wrap into a narrow column so the other columns stay readable. */
@media (max-width: 639.98px) {
    .table-modern .sticky-actions {
        max-width: 9.5rem;
    }

    .table-modern .sticky-actions > .d-flex {
        flex-wrap: wrap;
    }

    .table-modern .sticky-actions .btn {
        white-space: normal;
    }
}

.content-area .container,
.content-area .container-fluid {
    max-width: var(--content-max);
    margin-inline: 0;
    padding-inline: 0;
}

.table-modern tbody td {
    padding: 0.5rem 0.75rem;
    border: none;
    border-bottom: 1px solid var(--color-row-divider);
    font-size: var(--text-table-size);
    vertical-align: middle;
}

/* Grid Layout Styling */
.buyer-personas-grid,
.personas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    align-items: start;
}

.persona-card {
    transition: border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
    border: 2px solid transparent;
    border-radius: var(--radius-card);
    overflow: hidden;
    max-width: 100%;
    height: fit-content;
}

.persona-card .card-body {
    overflow: hidden;
    padding: 1rem;
}

.persona-card .d-flex {
    min-width: 0;
}

.persona-content {
    min-width: 0;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.persona-card .card-title {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.persona-card .card-text {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.persona-card .badge {
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    text-align: left;
    max-width: 100%;
}

.persona-badges {
    max-width: 100%;
}

.persona-card:hover {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-overlay);
}

.persona-card.selected {
    border-color: var(--color-primary);
    background-color: var(--color-surface-muted);
}

/* Status tags (spec #133): 22px high, 12px/600, always a text label, tinted background with
   the status colour as text. Tier-based, not literal-status-based: the same status word ("Draft")
   means a different tier depending on which entity it belongs to (see StatusBadge.razor), so
   entities map their own status to one of these tiers. */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 22px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    padding: 0 0.5rem;
    font-size: var(--text-label-size);
    line-height: var(--text-label-line);
    white-space: nowrap;
}

.status-badge.status-success { background: var(--color-success-bg); color: var(--color-success); }
.status-badge.status-info { background: var(--color-info-bg); color: var(--color-info); }
.status-badge.status-warning { background: var(--color-warning-bg); color: var(--color-warning); }
.status-badge.status-danger { background: var(--color-danger-bg); color: var(--color-danger); }
.status-badge.status-secondary { background: var(--color-neutral-bg); color: var(--color-text-muted); }
.status-badge.status-primary { background: var(--color-surface-active); color: var(--color-primary); }

/* AI output only: generated and waiting for approval. */
.status-badge.status-ai { background: var(--color-ai-bg); color: var(--color-ai-accent); }

/* Loading Spinner Modern Style */
.spinner-border.spinner-modern {
    color: var(--color-primary);
}

/* Metro Style Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--color-text-muted);
}

.empty-state > i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--color-text-muted);
}

.empty-state h5 {
    margin-bottom: 0.75rem;
    color: var(--color-text);
    font-size: var(--text-section-size);
    font-weight: 600;
}

/* Page title with action buttons (Designer, #198): one row on desktop; on phones the title gets its own row and the buttons stack below it. */
.page-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.page-title-bar .page-title-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.page-title-bar .page-title-actions .btn {
    margin: 0 !important;
}

@media (max-width: 576px) {
    .page-title-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .page-title-bar .page-title-actions {
        justify-content: stretch;
    }

    .page-title-bar .page-title-actions .btn {
        flex: 1 1 100%;
        text-align: center;
    }
}

.page-header {
    background: var(--color-surface);
    border-radius: var(--radius-card);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--color-border);
}

.page-header h2 {
    color: var(--color-text);
    font-weight: 700;
    margin-bottom: 0;
    font-size: var(--text-title-size);
}

/* Metro Style Responsive Design */
@media (max-width: 768px) {
    .buyer-personas-grid,
    .personas-grid {
        grid-template-columns: 1fr;
    }
    
    .persona-card .card-title {
        font-size: 1rem;
    }
    
    .persona-card .card-text {
        font-size: 0.85rem;
    }
    
    .persona-card .badge {
        font-size: 0.7rem;
    }
    
    .nav-tabs .nav-link {
        padding: 0.5rem 0.75rem;
        margin-right: 0;
    }
    
    .btn-modern-primary,
    .btn-modern-success,
    .btn-modern-danger,
    .btn-modern-secondary,
    .btn-tab-nav {
        padding: 0.375rem 0.75rem;
        font-size: 0.8125rem;
    }
    
    .page-header {
        padding: 1rem;
    }
    
    .page-header h2 {
        font-size: 1.25rem;
    }
}

@media (max-width: 576px) {
    .buyer-personas-grid,
    .personas-grid {
        gap: 0.75rem;
    }
    
    .persona-card .card-body {
        padding: 0.75rem;
    }
}

@media (min-width: 1400px) {
    .buyer-personas-grid,
    .personas-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    }
}

/* Social Post Card Grid (mirrors persona-card's hover/border language) */
.social-post-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--color-surface);
    border: 2px solid transparent;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: none;
    cursor: pointer;
    transition: border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
}

.social-post-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-overlay);
}

.social-post-thumb {
    position: relative;
    width: 100%;
    /* AI-generated ad images render at 1024x1024 (square) - match that instead of an
       arbitrary 4:3 box, which used to crop the top/bottom off every square image
       (cutting off the headline or CTA button). */
    aspect-ratio: 1 / 1;
    background: var(--color-surface-hover);
    overflow: hidden;
}

.social-post-thumb img {
    width: 100%;
    height: 100%;
    /* contain, not cover: a user-uploaded (non-square) photo would still get cropped
       by a fixed square box under `cover` - contain guarantees the whole image is
       always visible, letterboxed on whichever axis doesn't match, rather than ever
       trading completeness for a filled frame. */
    object-fit: contain;
}

.social-post-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-control-border);
    font-size: 2.5rem;
}

.social-post-platform-badge {
    position: absolute;
    left: 0.5rem;
    bottom: 0.5rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--color-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-overlay);
    font-size: 0.9rem;
    color: var(--color-primary);
}

.social-post-body {
    padding: 0.75rem 1rem 0.25rem;
    flex-grow: 1;
}

.social-post-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.social-post-meta {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 0.25rem;
}

.social-post-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem 0.75rem;
    margin-top: auto;
}

.social-post-actions {
    display: flex;
    gap: 0.25rem;
}

.social-post-actions .btn-link {
    padding: 0.15rem 0.35rem;
    text-decoration: none;
}
/* Phones (below 768 px): approved Designer board "Customers on phone". One column, 44 px targets, 16 px fields so the phone does not zoom. */
.phone-cards { display: flex; flex-direction: column; gap: 10px; }
.phone-card { display: flex; flex-direction: column; gap: 6px; min-height: 72px; padding: 12px; border: 1px solid var(--color-border, #E6E8EC); border-radius: 12px; background: #fff; color: inherit; text-decoration: none; }
.phone-card-head { display: flex; align-items: center; gap: 8px; justify-content: space-between; color: inherit; text-decoration: none; font-size: 1rem; }
.phone-link { display: inline-block; min-height: 32px; font-weight: 600; }

@media (max-width: 767.98px) {
    .phone-block { display: flex; width: 100%; min-height: 48px; align-items: center; justify-content: center; }
    .phone-half { flex: 1 1 0; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; }
    .phone-back { order: -1; flex-basis: 100%; border: 0; background: none; justify-content: flex-start; min-height: 44px; font-weight: 600; }
    .container .form-control, .container .form-select { font-size: 16px; min-height: 44px; }
    /* The form's Save and Cancel stay reachable in a bar fixed at the bottom. */
    .form-actions-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; padding: 10px 12px; background: #fff; border-top: 1px solid var(--color-border, #E6E8EC); }
    .form-actions-bar .btn { flex: 1 1 0; min-height: 48px; }
    .form-actions-bar .btn-modern-primary { flex: 2 1 0; }
    form:has(.form-actions-bar) { padding-bottom: 88px; }
}
