/* ============================================================
   VENDARA — UI Components CSS
   Общие переиспользуемые компоненты: кнопки, поля, бейджи.
   Подключается в layouts/frontend.blade.php и layouts/profile.blade.php
   ============================================================ */

/* ── Buttons ──────────────────────────────────────────────── */
.vd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 42px;
    padding: 0 22px;
    border-radius: var(--vd-radius-sm);
    font-family: var(--vd-font-body);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: background var(--vd-transition), color var(--vd-transition),
    border-color var(--vd-transition), transform var(--vd-transition),
    box-shadow var(--vd-transition);
    white-space: nowrap;
    line-height: 1;
}

.vd-btn--primary {
    background: var(--vd-brand);
    color: #fff;
    border: none;
}
.vd-btn--primary:hover {
    background: var(--vd-brand-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--vd-shadow-brand);
}
.vd-btn--primary:active  { transform: translateY(0); }
.vd-btn--primary:disabled,
.vd-btn--primary[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.vd-btn--secondary {
    background: transparent;
    color: var(--vd-text);
    border: 1.5px solid var(--vd-border);
}
.vd-btn--secondary:hover {
    border-color: var(--vd-brand);
    color: var(--vd-brand);
    background: var(--vd-brand-light);
}

.vd-btn--danger {
    background: transparent;
    color: var(--vd-red);
    border: 1.5px solid var(--vd-red-light);
}
.vd-btn--danger:hover {
    background: var(--vd-red-light);
    border-color: var(--vd-red);
}

.vd-btn--ghost {
    background: transparent;
    color: var(--vd-muted);
    border: none;
    padding: 0 8px;
}
.vd-btn--ghost:hover { color: var(--vd-brand); background: var(--vd-brand-light); }

/* Sizes */
.vd-btn--sm  { height: 34px; padding: 0 14px; font-size: 12px; }
.vd-btn--lg  { height: 50px; padding: 0 32px; font-size: 15px; }
.vd-btn--xl  { height: 56px; padding: 0 36px; font-size: 16px; }
.vd-btn--full { width: 100%; }

/* ── Form fields ──────────────────────────────────────────── */
.vd-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
.vd-form-row:last-child { margin-bottom: 0; }
.vd-form-row--full { grid-template-columns: 1fr; }
.vd-form-row--3    { grid-template-columns: 1fr 1fr 1fr; }

.vd-field { display: flex; flex-direction: column; gap: 5px; }

.vd-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--vd-ink);
    line-height: 1.3;
}
.vd-label span { color: var(--vd-brand); margin-left: 1px; }

.vd-input {
    height: 44px;
    border: 1.5px solid var(--vd-border);
    border-radius: var(--vd-radius-sm);
    padding: 0 14px;
    font-family: var(--vd-font-body);
    font-size: 14px;
    font-weight: 600;
    color: var(--vd-ink);
    background: var(--vd-white);
    outline: none;
    width: 100%;
    transition: border-color var(--vd-transition), box-shadow var(--vd-transition);
}
.vd-input:focus {
    border-color: var(--vd-brand);
    box-shadow: 0 0 0 3px rgba(255,107,43,0.10);
}
.vd-input::placeholder { color: var(--vd-placeholder); font-weight: 400; }
.vd-input:disabled     { background: var(--vd-surface); color: var(--vd-muted); cursor: not-allowed; }
.vd-input--error       { border-color: var(--vd-red); }
.vd-input--error:focus { box-shadow: 0 0 0 3px rgba(220,38,38,0.10); }

.vd-textarea {
    height: auto;
    min-height: 100px;
    resize: vertical;
    padding: 12px 14px;
    line-height: 1.6;
}

.vd-select {
    appearance: none;
    background: var(--vd-white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236B7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

.vd-field__hint  { font-size: 12px; color: var(--vd-muted); line-height: 1.4; }
.vd-field__error { font-size: 12px; color: var(--vd-red); font-weight: 600; }

.vd-form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 8px;
}

/* ── Alerts ───────────────────────────────────────────────── */
.vd-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 16px;
    border-radius: var(--vd-radius-sm);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 20px;
}
.vd-alert svg { flex-shrink: 0; margin-top: 1px; }
.vd-alert--success { background: var(--vd-green-light); border: 1.5px solid #BBF7D0; color: #15803D; }
.vd-alert--error   { background: var(--vd-red-light);   border: 1.5px solid #FECACA; color: #B91C1C; }
.vd-alert--warning { background: #FEF9C3; border: 1.5px solid #FDE68A; color: #92400E; }
.vd-alert--info    { background: #EFF6FF; border: 1.5px solid #BFDBFE; color: #1D4ED8; }

/* ── Status badges ────────────────────────────────────────── */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 24px;
    padding: 0 10px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}
.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}
.status-badge--pending_payment { background: #FEF9C3; color: #92400E; }
.status-badge--confirmed        { background: #EFF6FF; color: #1D4ED8; }
.status-badge--paid             { background: #DBEAFE; color: #1D4ED8; }
.status-badge--processing       { background: #EDE9FE; color: #6D28D9; }
.status-badge--ready            { background: #CCFBF1; color: #0F766E; }
.status-badge--shipped          { background: #F3E8FF; color: #7E22CE; }
.status-badge--delivered        { background: var(--vd-green-light); color: #15803D; }
.status-badge--cancelled        { background: var(--vd-surface);     color: var(--vd-muted); }

/* Company / verify badge */
.verify-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 22px;
    padding: 0 9px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 800;
}
.verify-badge--pending  { background: #FEF9C3; color: #92400E; }
.verify-badge--approved { background: var(--vd-green-light); color: #15803D; }
.verify-badge--rejected { background: var(--vd-red-light);   color: #B91C1C; }

/* ── Toggle switch ────────────────────────────────────────── */
.vd-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}
.vd-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.vd-toggle__track {
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: var(--vd-border);
    cursor: pointer;
    transition: background var(--vd-transition);
}
.vd-toggle__track::after {
    content: '';
    position: absolute;
    left: 3px;
    top: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    transition: transform var(--vd-transition);
}
.vd-toggle input:checked + .vd-toggle__track { background: var(--vd-brand); }
.vd-toggle input:checked + .vd-toggle__track::after { transform: translateX(20px); }

/* ── Breadcrumb ───────────────────────────────────────────── */
.vd-breadcrumb {
    padding: 14px 0;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--vd-muted);
}
.vd-breadcrumb__item { display: flex; align-items: center; gap: 6px; }
.vd-breadcrumb__link {
    color: var(--vd-muted);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--vd-transition);
}
.vd-breadcrumb__link:hover { color: var(--vd-brand); }
.vd-breadcrumb__sep     { color: var(--vd-border-dark); font-size: 14px; line-height: 1; }
.vd-breadcrumb__current { color: var(--vd-text); font-weight: 600; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
    .vd-form-row    { grid-template-columns: 1fr; }
    .vd-form-row--3 { grid-template-columns: 1fr; }
    .vd-form-actions { flex-direction: column; align-items: stretch; }
    .vd-btn--full-mobile { width: 100%; justify-content: center; }
}
