/* ==========================================================================
   VacancyDubai.ae — primitive restyle (Phase 2 of the POC design migration)
   24 Sep 2026.

   Loaded AFTER main.css and vd-components.css. This file deliberately
   restyles the LEGACY class names the existing 269 public views already use,
   so the whole site adopts the POC look without any Blade edits.

   To roll the global restyle back, remove the one <link> to this file in
   resources/views/layouts/app.blade.php. vd-components.css is unaffected:
   it only styles vd-* classes, which no legacy view uses yet.
   ========================================================================== */

/* Rhythm. The legacy base set line-height: 1 on body, which is what makes the
   current pages feel cramped next to the POC. */
body { line-height: 1.6; color: var(--uae-body); }
h1, h2, h3, h4, h5, h6 { color: var(--uae-ink); }
h1, h2, h3 { font-weight: var(--weight-heading); line-height: 1.25; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: var(--r-control);
    font-size: 15px;
    font-weight: var(--weight-strong);
    line-height: 1.2;
    box-shadow: none;
    text-transform: none;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-sm, .btn-group-sm > .btn { min-height: 36px; padding: 0 14px; font-size: 13px; }
.btn-lg, .btn-group-lg > .btn { min-height: 52px; padding: 0 26px; font-size: 16px; }

.btn-primary, .btn-yellow, .btn-success, .btn-info {
    border-color: var(--uae-primary);
    background: var(--uae-primary);
    color: #fff;
}
.btn-primary:hover, .btn-yellow:hover, .btn-success:hover, .btn-info:hover,
.btn-primary:focus, .btn-yellow:focus, .btn-success:focus, .btn-info:focus {
    border-color: var(--uae-primary-deep);
    background: var(--uae-primary-deep);
    color: #fff;
}
.btn-default, .btn-secondary, .btn-outline-primary, .btn-light {
    border-color: var(--uae-line);
    background: var(--uae-surface);
    color: var(--uae-primary-ink);
}
.btn-default:hover, .btn-secondary:hover, .btn-outline-primary:hover, .btn-light:hover {
    border-color: var(--uae-primary);
    background: var(--uae-primary-wash);
    color: var(--uae-primary-ink);
}
.btn-danger { border-color: var(--uae-danger); background: var(--uae-danger); color: #fff; }
.btn-link { min-height: auto; padding: 0; border: 0; color: var(--uae-primary-ink); }

/* Form controls */
.form-control, .form-select, select.form-control, input.form-control, textarea.form-control {
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid var(--uae-line);
    border-radius: var(--r-control);
    background-color: var(--uae-surface);
    color: var(--uae-ink);
    font-size: 15px;
    line-height: 1.4;
    box-shadow: none;
}
.form-control:focus, .form-select:focus {
    outline: 0;
    border-color: var(--uae-primary);
    box-shadow: 0 0 0 3px rgba(var(--uae-primary-rgb), .12);
}
.form-control::placeholder { color: var(--uae-muted); opacity: 1; }
textarea.form-control { min-height: 120px; }
.form-group { margin-bottom: 16px; }
.form-group label, label.control-label, .form-label {
    margin-bottom: 6px;
    color: var(--uae-ink);
    font-size: 13px;
    font-weight: var(--weight-strong);
}
.form-group .help-block, .form-text, .invalid-feedback { font-size: 12px; }
.has-error .form-control, .is-invalid.form-control { border-color: var(--uae-danger); }
.has-error .help-block, .invalid-feedback { color: var(--uae-danger); }

/* select2 declares its border with !important, so this has to as well */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    min-height: 44px;
    border: 1px solid var(--uae-line) !important;
    border-radius: var(--r-control) !important;
    background: var(--uae-surface);
    font-size: 15px;
}
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: var(--uae-primary) !important;
}
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: var(--uae-primary);
}
.select2-dropdown { border-color: var(--uae-line); border-radius: var(--r-control); }

/* Tables */
.table { color: var(--uae-body); font-size: 14px; }
.table > thead > tr > th, .table > thead th {
    border-bottom: 1px solid var(--uae-line);
    background: var(--uae-sand);
    color: var(--uae-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    white-space: nowrap;
}
.table > tbody > tr > td, .table > tbody td {
    border-bottom: 1px solid var(--uae-line);
    vertical-align: middle;
}
.table-striped > tbody > tr:nth-of-type(odd) > * { background: var(--uae-sand); }

/* Badges and pills */
.badge {
    padding: 5px 10px;
    border-radius: var(--r-pill);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.5;
}
.bg-primary, .badge-primary { background: var(--uae-primary) !important; }
.bg-success, .badge-success { background: var(--uae-ok) !important; }
.bg-danger, .badge-danger { background: var(--uae-danger) !important; }
.bg-warning, .badge-warning { background: var(--uae-gold) !important; color: var(--uae-ink) !important; }
.text-primary { color: var(--uae-primary-ink) !important; }
.text-muted { color: var(--uae-muted) !important; }

/* Pagination */
.pagination { gap: 6px; }
.pagination .page-link, .pagination > li > a, .pagination > li > span {
    display: grid;
    place-items: center;
    min-width: 38px;
    min-height: 38px;
    padding: 0 10px;
    border: 1px solid var(--uae-line);
    border-radius: var(--r-control);
    background: var(--uae-surface);
    color: var(--uae-body);
    font-size: 14px;
}
.pagination .page-link:hover, .pagination > li > a:hover { border-color: var(--uae-primary); color: var(--uae-primary-ink); }
.pagination .page-item.active .page-link, .pagination > .active > a, .pagination > .active > span {
    border-color: var(--uae-primary);
    background: var(--uae-primary);
    color: #fff;
    font-weight: 700;
}
.pagination .page-item.disabled .page-link { color: var(--uae-muted); }

/* Surfaces: cards, panels, widgets, popovers */
.card {
    border: var(--card-border);
    border-radius: var(--r-card);
    background: var(--uae-surface);
    box-shadow: var(--shadow-card);
}
.card-header, .card-footer {
    border-color: var(--uae-line);
    background: transparent;
}
.panel, .well {
    border: var(--card-border);
    border-radius: var(--r-card);
    background: var(--uae-surface);
    box-shadow: var(--shadow-card);
}
.sidebar .widget { border-color: var(--uae-line); }
.modal-content, .dropdown-menu {
    border: var(--card-border);
    border-radius: var(--r-card);
    box-shadow: var(--shadow-pop);
}
.modal-header, .modal-footer { border-color: var(--uae-line); }
.dropdown-item:active, .dropdown-item.active { background: var(--uae-primary); }
.alert { border: var(--card-border); border-radius: var(--r-control); }
hr { border-color: var(--uae-line); opacity: 1; }
