/* ── Assistência Técnica Plugin – Public Styles ── */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

.at-box {
    font-family: 'Inter', sans-serif;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 1.75rem;
    max-width: 600px;
    margin: 1.5rem auto;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.at-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #f3f4f6;
}

.at-icon { font-size: 32px; line-height: 1; }

.at-header h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 2px;
    color: #111827;
}
.at-header p { margin: 0; font-size: 13px; color: #6b7280; }

.at-section-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #9ca3af;
    margin: 1.25rem 0 .5rem;
}
.at-optional { font-weight: 400; text-transform: none; font-size: 11px; }

/* Device grid */
.at-device-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.at-device-small { grid-template-columns: repeat(4, 1fr); }

.at-device-btn {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: #374151;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: all .15s;
    font-family: inherit;
}
.at-device-btn i { font-size: 22px; color: #6b7280; }
.at-device-emoji { font-size: 24px; line-height: 1; }
.at-device-btn:hover { border-color: #1D9E75; background: #f0fdf9; }
.at-device-btn.at-selected { border-color: #1D9E75; background: #ecfdf5; color: #065f46; }
.at-device-btn.at-selected i { color: #1D9E75; }

/* Chips */
.at-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.at-chip {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    cursor: pointer;
    color: #374151;
    font-family: inherit;
    font-weight: 500;
    transition: all .15s;
}
.at-chip:hover { border-color: #1D9E75; }
.at-chip.at-selected { background: #ecfdf5; border-color: #1D9E75; color: #065f46; }

/* Urgência */
.at-urgency-row { display: flex; gap: 8px; }
.at-urgency-btn {
    flex: 1;
    padding: 9px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
    font-size: 13px;
    cursor: pointer;
    color: #374151;
    font-family: inherit;
    font-weight: 500;
    transition: all .15s;
}
.at-urgency-btn.at-selected { border-color: #1D9E75; background: #ecfdf5; color: #065f46; }

/* Inputs */
.at-input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    color: #111827;
    background: #fff;
    transition: border-color .15s;
    outline: none;
}
.at-input:focus { border-color: #1D9E75; box-shadow: 0 0 0 3px rgba(29,158,117,.1); }
textarea.at-input { resize: vertical; }

/* Preview */
.at-preview {
    background: #f0fdf9;
    border: 1px solid #a7f3d0;
    border-radius: 10px;
    padding: 14px;
    margin-top: 1.25rem;
    font-size: 13px;
    color: #065f46;
    line-height: 1.7;
}
.at-preview-label { font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }

/* Botão WhatsApp */
.at-wa-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 1.25rem;
    padding: 14px;
    border-radius: 10px;
    background: #25D366;
    border: none;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s;
}
.at-wa-btn:hover { background: #1ebe5c; }

/* Botão primário */
.at-btn-primary {
    background: #1D9E75;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background .15s;
}
.at-btn-primary:hover { background: #17825f; }

/* Search row */
.at-search-row { display: flex; gap: 10px; align-items: center; }

/* Resultado OS */
.at-os-card {
    margin-top: 1.25rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem;
}
.at-os-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1rem; }
.at-os-numero { font-size: 18px; font-weight: 700; color: #111827; }
.at-os-timeline { list-style: none; padding: 0; margin: 1rem 0 0; }
.at-os-timeline li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 6px 0;
    font-size: 13px;
    color: #6b7280;
    position: relative;
}
.at-os-timeline li.at-done { color: #065f46; }
.at-os-timeline li.at-current { color: #1D9E75; font-weight: 600; }
.at-os-step-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e5e7eb;
    flex-shrink: 0;
    margin-top: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}
.at-done .at-os-step-dot { background: #d1fae5; color: #065f46; }
.at-current .at-os-step-dot { background: #1D9E75; color: #fff; }

/* Status badges */
.at-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}
.at-status-Recebido        { background:#f3f4f6; color:#374151; }
.at-status-Em-analise      { background:#dbeafe; color:#1e40af; }
.at-status-Aguardando-peca { background:#fef3c7; color:#92400e; }
.at-status-Em-reparo       { background:#ede9fe; color:#5b21b6; }
.at-status-Pronto          { background:#d1fae5; color:#065f46; }
.at-status-Entregue        { background:#ccfbf1; color:#134e4a; }
.at-status-Cancelado       { background:#fee2e2; color:#991b1b; }

.at-os-detail { font-size: 13px; color: #374151; }
.at-os-detail-row { display:flex; gap:8px; margin-bottom:4px; }
.at-os-detail-label { font-weight:600; color:#6b7280; min-width:90px; }

/* Grid 2 */
.at-grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:12px; }

/* Agendamento resultado */
.at-ag-success {
    margin-top:1rem;
    background:#ecfdf5;
    border:1px solid #a7f3d0;
    border-radius:10px;
    padding:1rem;
    text-align:center;
    font-size:14px;
    color:#065f46;
}
.at-ag-success strong { display:block; font-size:16px; margin-bottom:4px; }

.at-error {
    margin-top:1rem;
    background:#fef2f2;
    border:1px solid #fecaca;
    border-radius:8px;
    padding:.75rem 1rem;
    font-size:13px;
    color:#991b1b;
}

@media(max-width:480px){
    .at-device-grid  { grid-template-columns: repeat(2,1fr); }
    .at-device-small { grid-template-columns: repeat(2,1fr); }
    .at-urgency-row  { flex-direction:column; }
    .at-grid-2       { grid-template-columns:1fr; }
    .at-search-row   { flex-direction:column; }
    .at-search-row .at-btn-primary { width:100%; }
}
