/* ============================================================
   agendar.css — Barbearia Carriel
   100% independente de Bootstrap / FullCalendar
   ============================================================ */

:root {
    --cc-bg-dark: #202020;
    --cc-bg-darker: #111;
    --cc-bg-card: rgba(0, 0, 0, 0.5);
    --cc-bg-input: #2c2c2c;
    --cc-border: #2a2a2a;
    --cc-border-light: #3a3a3a;
    --cc-yellow: #F5D100;
    --cc-yellow-light: #ffe44d;
    --cc-yellow-dark: #e0b800;
    --cc-text: #ffffff;
    --cc-text-muted: #b0b0b0;
    --cc-text-faint: #4a4a4a;
    --cc-danger: #a00;
    --cc-danger-bg: #2a1a1a;
    --cc-success: #28a745;
    --cc-error: #dc3545;
    --cc-radius-lg: 24px;
    --cc-radius-md: 16px;
    --cc-radius-sm: 12px;
    --cc-radius-pill: 30px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
    text-decoration: none;
    list-style: none;
}

body {
    min-height: 100vh;
    background: linear-gradient(90deg, #202020, #404040);
}

/* =======================
   FOOTER
   Rodapé simples com copyright
======================= */
.footer-home {
    background: #0a0a0a;
    padding: 20px;
    text-align: center;
    color: #666;
    font-size: 0.8rem;
}

/* =======================
   NAVBAR
   Removida daqui: agora usa o mesmo padrão das outras telas
   (navbar/nav-container/hamburger/user-dropdown/etc. em ../02-menu/menu.css)
======================= */

/* =======================
   CONTEÚDO PRINCIPAL
======================= */
.container-agendamento {
    max-width: 1300px;
    margin: 120px auto 60px;
    padding: 0 24px;
}

.hero-agendamento {
    text-align: center;
    margin-bottom: 40px;
}

.hero-agendamento h1 {
    font-size: 42px;
    font-weight: 800;
    color: var(--cc-yellow);
}

.hero-agendamento p {
    color: #ccc;
    margin-top: 8px;
}

/* =======================
   GRID / LAYOUT PRÓPRIO
   (substitui .row/.col-lg-8/.col-lg-4 do Bootstrap)
======================= */
.cc-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    align-items: start;
}

.cc-col-main,
.cc-col-side {
    min-width: 0;
}

@media (max-width: 992px) {
    .cc-layout {
        grid-template-columns: 1fr;
    }
}

/* =======================
   CARDS ESCUROS
======================= */
.card-dark {
    background: var(--cc-bg-card);
    backdrop-filter: blur(4px);
    border-radius: var(--cc-radius-lg);
    padding: 24px;
    margin-bottom: 30px;
    border: 1px solid var(--cc-border);
}

.card-dark h3,
.section-title {
    color: var(--cc-yellow);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
    border-left: 4px solid var(--cc-yellow);
    padding-left: 12px;
}

.section-title {
    margin: 20px 0 15px;
}

/* ============================================================
   CALENDÁRIO PRÓPRIO — CarrielCalendar (vanilla JS)
   ============================================================ */

#calendario {
    background: #181818;
    border-radius: var(--cc-radius-md);
    padding: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* ---- Toolbar ---- */
.cc-cal-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 4px 4px 16px;
}

.cc-cal-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cc-cal-nav-btn {
    background: #333;
    color: #fff;
    border: none;
    border-radius: var(--cc-radius-pill);
    padding: 8px 16px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: .2s;
}

.cc-cal-nav-btn:hover {
    background: #444;
}

.cc-cal-nav-btn--accent {
    background: var(--cc-yellow);
    color: #111;
}

.cc-cal-nav-btn--accent:hover {
    background: var(--cc-yellow-light);
}

.cc-cal-title {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: .3px;
    cursor: pointer;
    text-transform: capitalize;
    padding: 4px 10px;
    border-radius: 8px;
    transition: .2s;
}

.cc-cal-title:hover {
    background: rgba(245, 209, 0, 0.1);
    color: var(--cc-yellow);
}

.cc-cal-views {
    display: flex;
    gap: 6px;
    background: #151515;
    padding: 4px;
    border-radius: var(--cc-radius-pill);
}

.cc-cal-view-btn {
    background: transparent;
    border: none;
    color: var(--cc-text-muted);
    padding: 6px 14px;
    border-radius: var(--cc-radius-pill);
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: .2s;
}

.cc-cal-view-btn:hover {
    color: #fff;
}

.cc-cal-view-btn--active {
    background: var(--cc-yellow);
    color: #111;
}

/* ---- Grade (visualização Mês) ---- */
.cc-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border: 1px solid var(--cc-border);
    border-radius: 12px;
    overflow: hidden;
}

.cc-cal-weekday-row {
    border-bottom: 2px solid var(--cc-border);
    border-radius: 12px 12px 0 0;
}

.cc-cal-weekday {
    background: transparent;
    color: var(--cc-text-muted);
    text-transform: uppercase;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    text-align: center;
    padding: 12px 0;
}

.cc-cal-days-grid {
    border-top: none;
    border-radius: 0 0 12px 12px;
}

.cc-cal-day {
    background: var(--cc-bg-dark);
    border: 1px solid var(--cc-border);
    min-height: 84px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: background .2s;
}

.cc-cal-day-number {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 500;
    color: #eee;
    font-size: 0.85rem;
    transition: .2s;
}

.cc-cal-day--outro-mes .cc-cal-day-number {
    color: var(--cc-text-faint);
}

.cc-cal-day--passado,
.cc-cal-day--bloqueado {
    background: #181818;
    cursor: not-allowed;
    opacity: .55;
}

.cc-cal-day--disabled {
    pointer-events: none;
}

.cc-cal-day:not(.cc-cal-day--passado):not(.cc-cal-day--outro-mes):hover .cc-cal-day-number {
    background: rgba(245, 209, 0, 0.15);
    color: var(--cc-yellow);
}

.cc-cal-day--hoje {
    background: rgba(245, 209, 0, 0.05);
}

.cc-cal-day--hoje .cc-cal-day-number {
    background: var(--cc-yellow);
    color: #111;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(245, 209, 0, 0.3);
}

.cc-cal-day-events {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cc-cal-event {
    background: var(--cc-yellow);
    color: #111;
    border-radius: 6px;
    padding: 1px 4px;
    font-weight: 600;
    font-size: .68rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: background .2s;
}

.cc-cal-event:hover {
    background: var(--cc-yellow-light);
}

.cc-cal-day-more {
    color: var(--cc-yellow);
    font-weight: 600;
    font-size: .68rem;
    text-align: center;
    cursor: pointer;
}

/* ---- Visualização Semana ---- */
.cc-cal-week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.cc-cal-week-col {
    background: var(--cc-bg-dark);
    border: 1px solid var(--cc-border);
    border-radius: 12px;
    padding: 10px 8px;
    min-height: 140px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cc-cal-week-col-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--cc-text-muted);
    font-size: 0.7rem;
    text-transform: uppercase;
    gap: 2px;
}

.cc-cal-week-col-label strong {
    color: #fff;
    font-size: 1.1rem;
}

.cc-cal-week-col-events {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cc-cal-week-col-empty {
    color: var(--cc-text-faint);
    font-size: 0.72rem;
    text-align: center;
}

@media (max-width: 768px) {
    .cc-cal-week {
        grid-template-columns: repeat(7, minmax(70px, 1fr));
        overflow-x: auto;
    }
}

/* ---- Visualização Dia ---- */
.cc-cal-day-view {
    background: var(--cc-bg-dark);
    border: 1px solid var(--cc-border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cc-cal-day-view-info {
    color: var(--cc-yellow);
    font-weight: 700;
    font-size: 1.05rem;
}

.cc-cal-day-view-events {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cc-cal-day-view-empty {
    color: var(--cc-text-muted);
}

.cc-cal-day-view-btn {
    align-self: flex-start;
}

/* ============================================================
   HORÁRIOS E MESES (conteúdo dos modais)
   ============================================================ */

.horarios-grid,
.meses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 10px;
}

.horario-btn,
.mes-option {
    background: #1a1a1a;
    border: 1px solid var(--cc-border-light);
    color: white;
    padding: 10px;
    border-radius: var(--cc-radius-sm);
    text-align: center;
    cursor: pointer;
    transition: 0.2s;
}

.horario-btn:hover:not(.ocupado),
.mes-option:hover:not(.disabled) {
    background: var(--cc-yellow);
    color: #111;
    transform: scale(1.02);
}

.horario-btn.selecionado {
    background: var(--cc-yellow);
    color: #111;
    border-color: var(--cc-yellow);
    box-shadow: 0 0 8px rgba(245, 209, 0, 0.5);
}

.horario-btn.ocupado,
.mes-option.disabled {
    background: var(--cc-danger-bg);
    border-color: var(--cc-danger);
    color: var(--cc-danger);
    text-decoration: line-through;
    cursor: not-allowed;
    opacity: 0.7;
    transform: scale(1) !important;
}

/* ============================================================
   MODAL PRÓPRIO — substitui o modal do Bootstrap
   ============================================================ */

body.cc-modal-lock {
    overflow: hidden;
}

.cc-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease;
    z-index: 2000;
}

.cc-modal-overlay.cc-modal-open {
    opacity: 1;
    visibility: visible;
}

.cc-modal {
    width: 100%;
    max-width: 500px;
    background: linear-gradient(135deg, #1a1a1a, #111);
    border: 1px solid var(--cc-yellow);
    border-radius: var(--cc-radius-lg);
    color: #fff;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: translateY(16px) scale(.98);
    transition: transform .2s ease;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.cc-modal-overlay.cc-modal-open .cc-modal {
    transform: translateY(0) scale(1);
}

.cc-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--cc-border);
    padding: 20px 24px 14px;
}

.cc-modal-header h3 {
    color: var(--cc-yellow);
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cc-modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    opacity: .7;
    transition: opacity .2s;
}

.cc-modal-close:hover {
    opacity: 1;
    color: var(--cc-yellow);
}

.cc-modal-body {
    padding: 20px 24px 24px;
    overflow-y: auto;
}

.modal-data-label {
    color: #ccc;
    font-size: .9rem;
    margin-bottom: 16px;
    padding: 8px 12px;
    background: rgba(245, 209, 0, 0.08);
    border-radius: 10px;
    border-left: 3px solid var(--cc-yellow);
}

.modal-data-label strong {
    color: var(--cc-yellow);
}

/* =======================
   SERVIÇOS
======================= */
.servicos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.servico-card {
    background: #1a1a1a;
    border-radius: 20px;
    padding: 20px 12px;
    text-align: center;
    cursor: pointer;
    transition: 0.3s;
    border: 2px solid transparent;
}

.servico-card:hover {
    transform: translateY(-5px);
    border-color: var(--cc-yellow);
}

.servico-card.selected {
    border-color: var(--cc-yellow);
    background: rgba(245, 209, 0, 0.1);
    box-shadow: 0 0 15px rgba(245, 209, 0, 0.2);
}

.servico-icon {
    font-size: 40px;
    margin-bottom: 8px;
}

.servico-card h4 {
    color: white;
    font-size: 1rem;
    margin: 8px 0;
}

.servico-card .preco {
    color: var(--cc-yellow);
    font-weight: 700;
    font-size: 1.1rem;
}

.servico-card .tempo {
    color: #aaa;
    font-size: 0.7rem;
}

/* ============================================================
   CARDS DE PROFISSIONAL (mesmo padrão visual dos cards de serviço)
   ============================================================ */
.profissionais-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.profissional-card {
    background: #1a1a1a;
    border-radius: 20px;
    padding: 20px 12px;
    text-align: center;
    cursor: pointer;
    transition: 0.3s;
    border: 2px solid transparent;
}

.profissional-card:hover {
    transform: translateY(-5px);
    border-color: var(--cc-yellow);
}

.profissional-card.selected {
    border-color: var(--cc-yellow);
    background: rgba(245, 209, 0, 0.1);
    box-shadow: 0 0 15px rgba(245, 209, 0, 0.2);
}

.profissional-card h4 {
    color: white;
    font-size: 1rem;
    margin: 8px 0;
}

/* ============================================================
   FORMULÁRIO PRÓPRIO (substitui form-control/form-label/row/col do Bootstrap)
   ============================================================ */

.cc-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 576px) {
    .cc-form-grid {
        grid-template-columns: 1fr;
    }
}

.cc-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.cc-label {
    color: #e0e0e0;
    font-weight: 500;
    font-size: 0.9rem;
}

.cc-input,
.cc-textarea {
    width: 100%;
    background: var(--cc-bg-input);
    border: 1px solid var(--cc-border-light);
    color: white;
    border-radius: var(--cc-radius-sm);
    padding: 10px 14px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: .2s;
}

.cc-textarea {
    resize: vertical;
}

.cc-input:focus,
.cc-textarea:focus {
    outline: none;
    background: #333;
    border-color: var(--cc-yellow);
    box-shadow: 0 0 0 3px rgba(245, 209, 0, 0.2);
    color: white;
}

/* =======================
   SIDEBAR / RESUMO
======================= */
.card-sidebar {
    background: linear-gradient(135deg, #1a1a1a, #111);
    border-radius: var(--cc-radius-lg);
    padding: 24px;
    border: 1px solid var(--cc-yellow);
    margin-bottom: 30px;
}

.card-sidebar h3 {
    color: var(--cc-yellow);
    font-size: 1.3rem;
    margin-bottom: 20px;
    text-align: center;
}

.resumo-item {
    color: #ccc;
    padding: 8px 0;
    border-bottom: 1px dashed #333;
}

.resumo-total {
    display: flex;
    justify-content: space-between;
    margin: 15px 0;
    padding: 12px 0;
    border-top: 2px solid var(--cc-yellow);
    font-weight: 800;
    font-size: 1.2rem;
    color: white;
}

.resumo-total span:last-child {
    color: var(--cc-yellow);
    font-size: 1.4rem;
}

/* ============================================================
   BOTÕES PRÓPRIOS (substituem .btn/.btn-success/.w-100 do Bootstrap)
   ============================================================ */

.cc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: 40px;
    padding: 12px 20px;
    font-weight: 700;
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
    transition: .2s;
    text-align: center;
}

.cc-btn-primary {
    background: var(--cc-yellow);
    color: #111;
}

.cc-btn-primary:hover {
    transform: scale(1.02);
    background: var(--cc-yellow-light);
}

.cc-btn-whatsapp {
    background: var(--cc-success);
    color: #fff;
}

.cc-btn-whatsapp:hover {
    background: #218838;
}

.cc-btn-mp {
    background: #009ee3;
    color: #fff;
}

.cc-btn-mp:hover {
    background: #0086c3;
}

.cc-btn-mp:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.cc-w-100 {
    width: 100%;
}

/* Mantido para compatibilidade de nome, agora estilizado sem Bootstrap */
.btn-agendar-full {
    background: var(--cc-yellow);
    color: #111;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 40px;
    font-weight: 700;
    font-size: 1rem;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
}

.btn-agendar-full:hover {
    transform: scale(1.02);
    background: var(--cc-yellow-light);
}

/* =======================
   LISTA E TOAST
======================= */
#listaAgendamentos {
    max-height: 250px;
    overflow-y: auto;
}

.agendamento-item {
    background: #1a1a1a;
    padding: 10px;
    border-radius: var(--cc-radius-sm);
    margin-bottom: 8px;
    border-left: 3px solid var(--cc-yellow);
}

.agendamento-item .data-hora {
    color: var(--cc-yellow);
    font-weight: 600;
    font-size: 0.8rem;
}

.agendamento-item .cliente {
    color: white;
    font-size: 0.8rem;
}

.toast-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--cc-success);
    color: white;
    padding: 12px 20px;
    border-radius: var(--cc-radius-sm);
    display: none;
    z-index: 9999;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* =======================
   UTILITÁRIOS (substituem text-center / text-secondary / mt-3 do Bootstrap)
   ======================= */
.cc-text-center {
    text-align: center;
}

.cc-text-muted {
    color: var(--cc-text-muted);
}

.cc-mt-3 {
    margin-top: 16px;
}

/* =======================
   RESPONSIVO
======================= */
@media (max-width: 768px) {
    .container-agendamento {
        margin-top: 100px;
    }

    .hero-agendamento h1 {
        font-size: 32px;
    }

    .cc-cal-toolbar {
        justify-content: center;
        text-align: center;
    }

    .cc-cal-day {
        min-height: 60px;
    }
}

@media (max-width: 480px) {
    .container-agendamento {
        padding: 0 16px;
        margin-top: 90px;
    }

    .hero-agendamento h1 {
        font-size: 26px;
    }

    .servicos-grid,
    .profissionais-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cc-cal-event {
        font-size: .6rem;
    }
}
.servico-card.selected::after,
.profissional-card.selected::after {
    content: " ✔";
    color: #F5D100;
    font-weight: bold;
}

.cc-cal-day-dot {
    width: 6px;
    height: 6px;
    background: var(--cc-yellow);
    border-radius: 50%;
    margin-top: 2px;
}