/**
 * assets/css/skye-shared.css
 *
 * Reusable "dashboard" component styles — buttons, modals, alerts, forms,
 * empty states, badges. Shared by business_pages.php, manage_jobs.php, and
 * any future admin/business-facing screens.
 *
 * Assumes cstyle.css has already been loaded by cheader.php and defines
 * --skye-blue / --skye-dark. Do NOT redeclare :root or body{} here —
 * cstyle.css owns the page shell (body is display:flex so the nav layout
 * works); this file only owns components that live inside .container.
 */

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
    white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn[disabled] { opacity: .6; cursor: not-allowed; }

.btn-primary {
    background: var(--skye-blue);
    color: #fff;
    box-shadow: 0 2px 8px rgba(93, 156, 236, .28);
}
.btn-primary:hover { background: #4a8bd1; box-shadow: 0 4px 14px rgba(93, 156, 236, .36); }

.btn-secondary {
    background: #fff;
    color: var(--skye-dark);
    border: 1.5px solid #e2e8f0;
}
.btn-secondary:hover { background: #f1f5f9; border-color: #cbd5e1; }

.btn-danger-ghost {
    background: transparent;
    color: #94a3b8;
    border: none;
    padding: 6px 8px;
    border-radius: 8px;
}
.btn-danger-ghost:hover { background: #fef2f2; color: #dc2626; }

/* ── Alerts / toasts ───────────────────────────────────────────────────── */
.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 13.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}
.alert-info    { background: #eff6ff; color: #0369a1; border: 1.5px solid #bae6fd; }
.alert-success { background: #f0fdf4; color: #166534; border: 1.5px solid #bbf7d0; }
.alert-error   { background: #fef2f2; color: #991b1b; border: 1.5px solid #fecaca; }

/* ── Badges ────────────────────────────────────────────────────────────── */
.badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    margin-top: 4px;
}
.badge-verified { background: #10b981; color: #fff; }
.badge-pending  { background: #fef3c7; color: #92400e; }

/* ── Empty state ───────────────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    background: #fff;
    border: 1.5px dashed #e2e8f0;
    border-radius: 16px;
    color: #64748b;
}
.empty-state i { font-size: 40px; color: #cbd5e1; margin-bottom: 14px; display: block; }
.empty-state p { margin: 6px 0; font-size: 14px; }
.empty-state p.lead { font-size: 15px; font-weight: 800; color: var(--skye-dark); }

/* ── Modal ─────────────────────────────────────────────────────────────── */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .48);
    backdrop-filter: blur(2px);
    z-index: 1000;
    padding: 20px;
    overflow-y: auto;
}
.modal.open { display: flex; align-items: flex-start; justify-content: center; }

.modal-content {
    background: #fff;
    border-radius: 16px;
    padding: 26px;
    width: 100%;
    max-width: 520px;
    margin-top: 48px;
    position: relative;
    animation: skye-pop .18s ease;
    box-shadow: 0 20px 60px rgba(15, 23, 42, .22);
}

@keyframes skye-pop {
    from { opacity: 0; transform: translateY(8px) scale(.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    background: #f1f5f9;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 16px;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-close:hover { background: #e2e8f0; color: var(--skye-dark); }

.modal-title { font-size: 18px; font-weight: 800; margin-bottom: 4px; color: var(--skye-dark); letter-spacing: -0.2px; }
.modal-sub   { font-size: 13px; color: #64748b; font-weight: 600; margin-bottom: 22px; }

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 22px;
}

/* ── Forms ─────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }

.form-label {
    display: block;
    font-size: 12.5px;
    font-weight: 800;
    color: #475569;
    margin-bottom: 7px;
}

.form-input, .form-textarea {
    width: 100%;
    padding: 11px 13px;
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    font-family: inherit;
    font-size: 14px;
    color: var(--skye-dark);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--skye-blue);
    box-shadow: 0 0 0 3px rgba(93, 156, 236, .14);
}

.form-textarea { resize: vertical; min-height: 100px; line-height: 1.5; }
.form-hint { font-size: 12px; color: #94a3b8; margin-top: 4px; }

.char-count { font-size: 11px; color: #94a3b8; font-weight: 700; text-align: right; margin-top: 4px; }

/* ── Loading spinner ───────────────────────────────────────────────────── */
.loading {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #cbd5e1;
    border-top-color: var(--skye-blue);
    border-radius: 50%;
    animation: skye-spin .6s linear infinite;
}
@keyframes skye-spin { to { transform: rotate(360deg); } }

/* ── Dashboard container ──────────────────────────────────────────────── */
/* Standard content wrapper for pages included via cheader.php. Adjust
   --nav-clearance per page if the nav height differs. */
.dashboard-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 120px 20px 60px;
}

@media (max-width: 560px) {
    .modal-content { margin-top: 24px; padding: 22px; }
}
