/* Ana Terra Tattoo | Agenda & Atendimentos v1.10.0 */
.att-agenda-v20-head { margin-bottom: 18px; }
.att-agenda-v20-head h1 { max-width: 760px; }

.att-agenda-focus-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 16px;
}
.att-agenda-focus-strip article {
    min-height: 108px;
    padding: 16px 18px;
    border: 1px solid rgba(58,33,26,.09);
    border-radius: 17px;
    background: rgba(255,255,255,.65);
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.att-agenda-focus-strip span {
    color: var(--att-muted);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .12em;
}
.att-agenda-focus-strip strong {
    margin: 6px 0 2px;
    color: var(--att-earth);
    font-family: var(--att-font-display);
    font-size: 34px;
    font-weight: 400;
    line-height: .95;
}
.att-agenda-focus-strip strong.is-text { font-size: 22px; line-height: 1.02; }
.att-agenda-focus-strip small { color: var(--att-muted); font-size: 9px; }

.att-calendar-toolbar-v20 {
    margin-bottom: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(58,33,26,.08);
    border-radius: 16px;
    background: rgba(255,255,255,.55);
}
.att-calendar-nav { display: flex; align-items: center; gap: 7px; }
.att-calendar-nav > strong {
    margin-left: 10px;
    color: var(--att-earth);
    font-family: var(--att-font-display);
    font-size: 20px;
    font-weight: 400;
}

.att-agenda-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 14px;
    align-items: start;
}
.att-agenda-calendar-shell,
.att-agenda-side-v20 > section {
    border: 1px solid rgba(58,33,26,.09);
    border-radius: 20px;
    background: rgba(255,255,255,.65);
}
.att-agenda-calendar-shell { padding: 12px; min-width: 0; }
.att-agenda-status-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 2px 4px 12px;
    color: var(--att-muted);
    font-size: 8px;
}
.att-agenda-status-legend span { display: inline-flex; align-items: center; gap: 5px; }
.att-agenda-status-legend i { width: 7px; height: 7px; border-radius: 50%; background: var(--att-red); }
.att-agenda-status-legend i.is-conversation { background: var(--att-leaf); }
.att-agenda-status-legend i.is-confirmed { background: var(--att-gold); }
.att-agenda-status-legend i.is-prep { background: #b36b2c; }
.att-agenda-status-legend i.is-session { background: #6d3f31; }
.att-agenda-status-legend i.is-done { background: #6d7556; }

.att-agenda-week-v20 {
    display: grid;
    grid-template-columns: repeat(7,minmax(128px,1fr));
    gap: 7px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
}
.att-agenda-week-day-v20 {
    min-height: 520px;
    padding: 10px;
    border: 1px solid rgba(58,33,26,.08);
    border-radius: 14px;
    background: rgba(255,249,239,.56);
}
.att-agenda-week-day-v20.is-today {
    border-color: rgba(217,154,43,.45);
    box-shadow: inset 0 0 0 1px rgba(217,154,43,.08);
    background: #fffaf2;
}
.att-agenda-week-day-v20 > header { display: flex; align-items: center; justify-content: space-between; min-height: 54px; }
.att-agenda-week-day-v20 > header > a:first-child { color: inherit; text-decoration: none; }
.att-agenda-week-day-v20 > header span { display: block; color: var(--att-muted); font-size: 7px; font-weight: 800; letter-spacing: .1em; }
.att-agenda-week-day-v20 > header strong { display: block; margin-top: 2px; font-family: var(--att-font-display); font-size: 23px; font-weight: 400; }
.att-agenda-add-mini { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--att-sand); color: var(--att-earth) !important; text-decoration: none; font-size: 16px; }
.att-agenda-week-stack { display: grid; gap: 7px; }
.att-agenda-free { color: rgba(119,106,97,.45); font-size: 8px; }
.att-agenda-event-v20 {
    position: relative;
    min-height: 102px;
    padding: 10px;
    border-radius: 11px;
    border: 1px solid rgba(58,33,26,.06);
    border-left: 3px solid var(--att-gold);
    background: #fffaf3;
    color: var(--att-earth);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 5px;
    overflow: hidden;
}
.att-agenda-event-v20 > div { display: flex; justify-content: space-between; gap: 5px; align-items: center; }
.att-agenda-event-v20 b { color: var(--att-muted); font-size: 8px; }
.att-agenda-event-v20 em { max-width: 76px; color: #8f5f20; font-size: 6.5px; font-style: normal; font-weight: 800; text-align: right; line-height: 1.2; }
.att-agenda-event-v20 > strong { font-size: 10px; line-height: 1.25; }
.att-agenda-event-v20 > span { color: var(--att-muted); font-size: 7px; }
.att-agenda-event-v20 > small { margin-top: auto; color: var(--att-muted); font-size: 7px; }
.att-agenda-event-v20.status-em_conversa { border-left-color: var(--att-leaf); background: rgba(102,112,68,.07); }
.att-agenda-event-v20.status-aguardando_confirmacao,
.att-agenda-event-v20.status-sinal_pendente,
.att-agenda-event-v20.status-preparar_desenho { border-left-color: #b36b2c; background: rgba(179,107,44,.07); }
.att-agenda-event-v20.status-em_atendimento { border-left-color: #6d3f31; background: rgba(109,63,49,.08); }
.att-agenda-event-v20.status-realizado,
.att-agenda-event-v20.status-pos_atendimento { border-left-color: #6d7556; background: rgba(109,117,86,.08); }
.att-agenda-event-v20.status-cancelado,
.att-agenda-event-v20.status-nao_compareceu { opacity: .48; filter: grayscale(.25); }
.att-agenda-event-v20.status-bloqueado { border-left-color: #8f867e; background: rgba(119,106,97,.08); }
.att-agenda-event-v20.has-conflict::after { content: "!"; position: absolute; right: 6px; bottom: 6px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--att-red); color: white; font-size: 8px; font-weight: 900; }

.att-agenda-side-v20 { display: grid; gap: 12px; }
.att-agenda-side-v20 > section { padding: 16px; }
.att-agenda-side-v20 > section > header { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
.att-agenda-side-v20 h2 { margin: 3px 0 0; font-family: var(--att-font-display); font-size: 22px; font-weight: 400; }
.att-agenda-side-v20 header > a { color: var(--att-red); text-decoration: none; font-size: 8px; font-weight: 800; }
.att-agenda-today-list,
.att-agenda-waitlist { display: grid; gap: 6px; }
.att-agenda-today-list > a,
.att-agenda-waitlist > a {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    align-items: center;
    min-height: 58px;
    padding: 9px 10px;
    border-radius: 12px;
    background: rgba(243,231,211,.48);
    color: var(--att-earth);
    text-decoration: none;
}
.att-agenda-today-list time { min-width: 37px; font-family: var(--att-font-display); font-size: 17px; }
.att-agenda-today-list strong,
.att-agenda-waitlist strong { display: block; font-size: 9px; }
.att-agenda-today-list span,
.att-agenda-waitlist span { display: block; margin-top: 2px; color: var(--att-muted); font-size: 7.5px; line-height: 1.35; }
.att-agenda-today-list b,
.att-agenda-waitlist b { color: var(--att-gold); font-size: 15px; }
.att-agenda-waitlist > a { grid-template-columns: 1fr auto; }

.att-agenda-day-v20 { padding: 10px; }
.att-agenda-day-v20 > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 4px 5px 16px; }
.att-agenda-day-v20 h2 { margin: 3px 0 0; font-family: var(--att-font-display); font-size: 28px; font-weight: 400; }
.att-agenda-day-v20 > header > a { color: var(--att-red); text-decoration: none; font-size: 8px; font-weight: 800; }
.att-agenda-day-list-v20 { display: grid; gap: 8px; }
.att-agenda-day-card-v20 {
    display: grid;
    grid-template-columns: 70px 1fr auto;
    gap: 14px;
    align-items: center;
    min-height: 90px;
    padding: 12px 14px;
    border: 1px solid rgba(58,33,26,.08);
    border-left: 4px solid var(--att-gold);
    border-radius: 14px;
    background: #fffaf3;
    color: var(--att-earth);
    text-decoration: none;
}
.att-agenda-day-time strong { display:block; font-family: var(--att-font-display); font-size: 24px; font-weight: 400; }
.att-agenda-day-time span { color:var(--att-muted); font-size:9px; }
.att-agenda-day-copy > span { color:#8f5f20; font-size:7px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.att-agenda-day-copy h3 { margin:4px 0; font-size:13px; }
.att-agenda-day-copy p { margin:0; color:var(--att-muted); font-size:9px; }
.att-agenda-ready { text-align:right; }
.att-agenda-ready b { display:block; font-family:var(--att-font-display); font-size:22px; font-weight:400; }
.att-agenda-ready small { color:var(--att-muted); font-size:7px; }

.att-agenda-month-v20 { overflow-x:auto; }
.att-agenda-month-weekdays,
.att-agenda-month-grid-v20 { display:grid; grid-template-columns:repeat(7,minmax(100px,1fr)); min-width:760px; }
.att-agenda-month-weekdays span { padding:7px 10px; color:var(--att-muted); font-size:7px; font-weight:800; text-transform:uppercase; }
.att-agenda-month-grid-v20 > article { min-height:120px; padding:8px; border-top:1px solid rgba(58,33,26,.08); border-right:1px solid rgba(58,33,26,.08); }
.att-agenda-month-grid-v20 > article.is-muted { opacity:.42; }
.att-agenda-month-grid-v20 > article.is-today { background:rgba(217,154,43,.06); }
.att-agenda-month-grid-v20 article > header { display:flex; justify-content:space-between; align-items:center; margin-bottom:5px; }
.att-agenda-month-grid-v20 article > header a { color:var(--att-earth); text-decoration:none; font-size:9px; font-weight:800; }
.att-agenda-month-grid-v20 article > header a:last-child { color:var(--att-red); font-size:15px; }
.att-agenda-month-grid-v20 article > div { display:grid; gap:3px; }
.att-agenda-month-grid-v20 article > div > a { min-width:0; display:flex; gap:4px; padding:4px 5px; border-radius:6px; background:rgba(217,154,43,.08); color:var(--att-earth); text-decoration:none; font-size:7px; }
.att-agenda-month-grid-v20 article > div > a b { font-size:6.5px; }
.att-agenda-month-grid-v20 article > div > a span { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.att-agenda-month-grid-v20 article > div > small { color:var(--att-muted); font-size:7px; }

/* Drawer de atendimento */
.att-appointment-drawer { place-items: stretch end; padding:0; }
.att-appointment-drawer .att-appointment-backdrop { background:rgba(31,16,12,.56); }
.att-appointment-panel-v20 {
    width:min(760px,100vw);
    max-height:100vh;
    min-height:100vh;
    border-radius:0;
    padding:26px 28px 40px;
    box-shadow:-25px 0 70px rgba(31,16,12,.22);
}
.att-agenda-pipeline {
    display:grid;
    grid-template-columns:repeat(6,1fr);
    gap:0;
    margin:0 0 16px;
    padding:12px 10px;
    border-radius:14px;
    background:rgba(243,231,211,.55);
}
.att-agenda-pipeline span { position:relative; display:grid; justify-items:center; gap:5px; color:var(--att-muted); font-size:6.5px; text-align:center; }
.att-agenda-pipeline span::before { content:""; position:absolute; left:-50%; right:50%; top:5px; height:1px; background:rgba(58,33,26,.14); }
.att-agenda-pipeline span:first-child::before { display:none; }
.att-agenda-pipeline i { position:relative; z-index:2; width:10px; height:10px; border-radius:50%; background:#d7cec0; }
.att-agenda-pipeline span.is-done i { background:var(--att-gold); }
.att-agenda-pipeline span.is-done::before { background:rgba(217,154,43,.65); }
.att-agenda-pipeline span.is-current b { color:var(--att-earth); }
.att-agenda-quick-status { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:18px; }
.att-agenda-quick-status a { padding:6px 9px; border:1px solid rgba(58,33,26,.12); border-radius:999px; background:white; color:var(--att-earth); text-decoration:none; font-size:7px; font-weight:800; }
.att-agenda-quick-status a:hover { border-color:var(--att-gold); background:var(--att-sand); }
.att-appointment-form-v20 { gap:12px; }
.att-agenda-form-section { padding:16px; border:1px solid rgba(58,33,26,.08); border-radius:16px; background:rgba(255,255,255,.6); display:grid; gap:12px; }
.att-agenda-form-section > header { display:flex; align-items:flex-start; gap:10px; }
.att-agenda-form-section > header > span { width:28px; height:28px; display:grid; place-items:center; border-radius:50%; background:var(--att-earth); color:var(--att-ivory); font-size:7px; font-weight:800; }
.att-agenda-form-section > header strong { display:block; font-family:var(--att-font-display); font-size:20px; font-weight:400; }
.att-agenda-form-section > header small { display:block; margin-top:2px; color:var(--att-muted); font-size:8px; }
.att-agenda-reference-picker { display:grid; gap:9px; }
.att-agenda-reference-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:7px; }
.att-agenda-reference-grid figure { position:relative; aspect-ratio:1/1; margin:0; overflow:hidden; border-radius:10px; background:var(--att-sand); }
.att-agenda-reference-grid img { width:100%; height:100%; object-fit:cover; display:block; }
.att-agenda-reference-grid button { position:absolute; right:4px; top:4px; width:22px; height:22px; border:0; border-radius:50%; background:rgba(29,14,10,.72); color:white; cursor:pointer; }
.att-agenda-checklist { display:grid; grid-template-columns:1fr 1fr; gap:7px; }
.att-agenda-checklist label { display:grid; grid-template-columns:auto 1fr; gap:8px; align-items:start; padding:10px; border-radius:11px; background:rgba(243,231,211,.5); cursor:pointer; }
.att-agenda-checklist input { margin-top:2px; accent-color:var(--att-gold); }
.att-agenda-checklist b { display:block; font-size:9px; }
.att-agenda-checklist small { display:block; margin-top:2px; color:var(--att-muted); font-size:7px; line-height:1.35; }
.att-agenda-aftercare-actions { display:flex; align-items:center; gap:8px; padding:14px 16px; border-radius:14px; background:var(--att-earth); color:var(--att-ivory); }
.att-agenda-aftercare-actions > div { margin-right:auto; }
.att-agenda-aftercare-actions strong { display:block; margin-top:3px; font-family:var(--att-font-display); font-size:18px; font-weight:400; }
.att-agenda-aftercare-actions a { padding:7px 9px; border-radius:999px; background:rgba(255,249,239,.1); color:var(--att-ivory); text-decoration:none; font-size:7px; font-weight:800; }

@media (max-width:1180px) {
    .att-agenda-workspace { grid-template-columns:1fr; }
    .att-agenda-side-v20 { grid-template-columns:1fr 1fr; }
    .att-agenda-focus-strip { grid-template-columns:repeat(2,1fr); }
}
@media (max-width:820px) {
    .att-agenda-v20-head { gap:14px; }
    .att-agenda-focus-strip { grid-template-columns:1fr 1fr; }
    .att-agenda-focus-strip article { min-height:92px; padding:14px; }
    .att-agenda-focus-strip strong { font-size:28px; }
    .att-calendar-toolbar-v20 { align-items:stretch; }
    .att-calendar-nav { flex-wrap:wrap; }
    .att-calendar-nav > strong { width:100%; margin:6px 0 0; }
    .att-agenda-side-v20 { grid-template-columns:1fr; }
    .att-agenda-week-v20 { grid-template-columns:repeat(7, minmax(160px,1fr)); }
    .att-appointment-panel-v20 { padding:20px 16px 36px; }
    .att-agenda-pipeline { overflow-x:auto; grid-template-columns:repeat(6,90px); }
    .att-agenda-reference-grid { grid-template-columns:repeat(3,1fr); }
}
@media (max-width:580px) {
    .att-agenda-v20-head .att-system-primary { width:100%; justify-content:center; }
    .att-agenda-focus-strip { grid-template-columns:1fr 1fr; gap:7px; }
    .att-agenda-focus-strip article { min-height:82px; padding:12px; }
    .att-agenda-focus-strip strong { font-size:24px; }
    .att-agenda-focus-strip strong.is-text { font-size:17px; }
    .att-calendar-switch { width:100%; display:grid; grid-template-columns:repeat(3,1fr); }
    .att-calendar-switch a { text-align:center; }
    .att-agenda-calendar-shell { padding:8px; }
    .att-agenda-status-legend { gap:7px; }
    .att-agenda-day-card-v20 { grid-template-columns:56px 1fr; }
    .att-agenda-ready { grid-column:2; text-align:left; display:flex; gap:5px; align-items:baseline; }
    .att-agenda-ready b { font-size:17px; }
    .att-agenda-checklist { grid-template-columns:1fr; }
    .att-agenda-reference-grid { grid-template-columns:repeat(2,1fr); }
    .att-agenda-aftercare-actions { align-items:flex-start; flex-direction:column; }
    .att-agenda-aftercare-actions > div { margin:0 0 4px; }
    .att-appointment-submit-row { align-items:stretch; flex-direction:column; }
    .att-appointment-submit-row > * { width:100%; justify-content:center; text-align:center; }
}

/* v1.16.2 · refinamento funcional e mobile-first da navegação da Agenda */
.att-calendar-toolbar-v20,
.att-calendar-switch,
.att-calendar-nav {
    position: relative;
    z-index: 6;
}
.att-calendar-switch a,
.att-calendar-nav a {
    position: relative;
    z-index: 2;
    pointer-events: auto;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.att-calendar-switch {
    padding: 4px;
    border-radius: 13px;
    background: rgba(243,231,211,.7);
}
.att-calendar-switch a {
    border-color: transparent;
    background: transparent;
}
.att-calendar-switch a:hover,
.att-calendar-switch a:focus-visible {
    border-color: transparent;
    background: rgba(217,154,43,.10);
    color: var(--att-earth);
    outline: none;
}
.att-calendar-switch a.is-active,
.att-calendar-switch a.is-active:hover,
.att-calendar-switch a.is-active:focus-visible {
    border-color: var(--att-earth);
    background: var(--att-earth);
    color: var(--att-ivory);
    box-shadow: 0 5px 14px rgba(58,33,26,.12);
}
.att-calendar-nav a:hover,
.att-calendar-nav a:focus-visible {
    border-color: var(--att-gold);
    background: rgba(217,154,43,.09);
    color: var(--att-earth);
    outline: none;
}

@media (max-width:580px) {
    .att-calendar-toolbar-v20 {
        gap: 10px;
        padding: 10px;
    }
    .att-calendar-nav {
        width: 100%;
        display: grid;
        grid-template-columns: 38px auto 38px minmax(0,1fr);
        gap: 5px;
    }
    .att-calendar-nav > strong {
        width: auto;
        min-width: 0;
        margin: 0 0 0 4px;
        align-self: center;
        font-size: 15px;
        line-height: 1.1;
        text-align: right;
    }
    .att-calendar-nav a { min-height: 38px; padding: 0 10px; }
    .att-calendar-nav a:first-child,
    .att-calendar-nav a:last-child { width: 38px; }
    .att-calendar-switch { width: 100%; }
    .att-calendar-switch a { min-height: 40px; }

    /* Semana: no celular cada dia vira uma faixa legível, sem rolagem horizontal longa. */
    .att-agenda-week-v20 {
        grid-template-columns: 1fr;
        gap: 8px;
        overflow: visible;
    }
    .att-agenda-week-day-v20 {
        min-height: 0;
        padding: 9px;
    }
    .att-agenda-week-day-v20 > header { min-height: 48px; }
    .att-agenda-week-stack { gap: 6px; }
    .att-agenda-event-v20 {
        min-height: 74px;
        padding: 9px 10px;
    }

    /* Mês: cabe inteiro na largura do telefone. Os detalhes ficam para o toque no dia. */
    .att-agenda-month-v20 { overflow: visible; }
    .att-agenda-month-weekdays,
    .att-agenda-month-grid-v20 {
        min-width: 0;
        width: 100%;
        grid-template-columns: repeat(7,minmax(0,1fr));
    }
    .att-agenda-month-weekdays span {
        padding: 6px 1px;
        font-size: 6px;
        text-align: center;
    }
    .att-agenda-month-grid-v20 > article {
        min-width: 0;
        min-height: 58px;
        padding: 4px;
    }
    .att-agenda-month-grid-v20 article > header { margin: 0; }
    .att-agenda-month-grid-v20 article > header a:first-child {
        width: 25px;
        height: 25px;
        display: grid;
        place-items: center;
        border-radius: 50%;
        font-size: 8px;
    }
    .att-agenda-month-grid-v20 article.is-today > header a:first-child {
        background: var(--att-earth);
        color: var(--att-ivory);
    }
    .att-agenda-month-grid-v20 article > header a:last-child { display: none; }
    .att-agenda-month-grid-v20 article > div > a {
        width: 7px;
        height: 7px;
        min-height: 0;
        margin: 3px auto 0;
        padding: 0;
        display: block;
        border-radius: 50%;
        background: var(--att-gold);
        overflow: hidden;
        text-indent: -9999px;
    }
    .att-agenda-month-grid-v20 article > div > a:nth-child(n+2) { display: none; }
    .att-agenda-month-grid-v20 article > div > small {
        display: block;
        margin-top: 2px;
        font-size: 6px;
        text-align: center;
    }
}


/* v1.16.3 — estados de clique/foco da Agenda sem accent rosa do WordPress */
body.att-system-page .att-agenda-event-v20,
body.att-system-page .att-agenda-event-v20:is(:hover,:focus,:focus-visible,:active),
body.att-system-page .att-agenda-day-v20 a:is(:hover,:focus,:focus-visible,:active),
body.att-system-page .att-agenda-month-grid-v20 a:is(:hover,:focus,:focus-visible,:active),
body.att-system-page .att-agenda-view-switch a:is(:hover,:focus,:focus-visible,:active) {
    --wp-admin-theme-color: #D99A2B;
    --wp-admin-theme-color-darker-10: #3A211A;
    --wp-components-color-accent: #D99A2B;
    outline-color: #D99A2B !important;
    box-shadow: none !important;
}

body.att-system-page .att-agenda-event-v20:is(:hover,:focus,:focus-visible,:active) {
    color: #3A211A !important;
}

body.att-system-page .att-agenda-view-switch a.is-active,
body.att-system-page .att-agenda-view-switch a.is-active:is(:hover,:focus,:focus-visible,:active) {
    background: #3A211A !important;
    border-color: #3A211A !important;
    color: #FFF9EF !important;
}
