/**
 * Frontend Styles - Estilo Fiel ao Calendly
 *
 * @package WP_Agendamento
 */

#wp-agendamento-widget {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    max-width: 780px;
    margin: 30px auto;
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
    color: #0a2540;
    transition: max-width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

#wp-agendamento-widget * {
    box-sizing: border-box;
}

/* Estado Expandido quando o usuário escolhe uma data */
#wp-agendamento-widget.has-date-selected {
    max-width: 990px;
}

/* Selo Superior Direito */
.wp-agendamento-ribbon {
    display: none !important;
    position: absolute;
    top: 22px;
    right: -42px;
    background: #666666;
    color: #ffffff;
    padding: 4px 45px;
    font-size: 8px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transform: rotate(45deg);
    text-align: center;
    line-height: 1.2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    z-index: 10;
    pointer-events: none;
}

.wp-agendamento-card-body {
    display: flex;
    min-height: 540px;
}

/* =========================================================================
   COLUNA DA ESQUERDA (SIDEBAR DE PERFIL)
   ========================================================================= */

.wp-agendamento-sidebar {
    width: 290px;
    min-width: 290px;
    padding: 32px 24px 24px 32px;
    border-right: 1px solid #e8e8e8;
    display: flex;
    flex-direction: column;
}

.wp-agendamento-profile {
    margin-bottom: 12px;
}

.wp-agendamento-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin-bottom: 12px;
}

.wp-agendamento-avatar-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #0066ff;
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.wp-agendamento-host-name {
    font-size: 14px;
    color: #4d6278;
    font-weight: 600;
    display: block;
}

.wp-agendamento-event-title {
    font-size: 24px;
    font-weight: 700;
    color: #0a2540;
    margin: 4px 0 20px 0;
    line-height: 1.2;
}

.wp-agendamento-meta-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: auto;
}

.wp-agendamento-meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #4d6278;
}

.wp-agendamento-meta-item svg {
    color: #4d6278;
    flex-shrink: 0;
}

.wp-agendamento-sidebar-footer {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wp-agendamento-sidebar-footer a {
    font-size: 13px;
    color: #0066ff;
    text-decoration: none;
    font-weight: 600;
}

.wp-agendamento-sidebar-footer a:hover {
    text-decoration: underline;
}

/* =========================================================================
   ÁREA DA DIREITA (CALENDÁRIO + SLOTS)
   ========================================================================= */

.wp-agendamento-content-area {
    flex: 1;
    padding: 32px;
    display: flex;
    flex-direction: column;
}

.wp-agendamento-step-title {
    font-size: 20px;
    font-weight: 700;
    color: #0a2540;
    margin: 0 0 24px 0;
}

.wp-agendamento-picker-grid {
    display: flex;
    gap: 24px;
}

.wp-agendamento-calendar-box {
    flex: 1;
    min-width: 380px;
}

/* Cabeçalho do Mês */
.wp-agendamento-calendar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    margin-bottom: 24px;
}

.wp-agendamento-month-title {
    font-size: 15px;
    font-weight: 700;
    color: #0a2540;
}

.wp-agendamento-nav-btn {
    background: transparent;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #0066ff;
    transition: background 0.2s;
}

.wp-agendamento-nav-btn:hover {
    background: #f0f6ff;
}

/* Grade dos Dias da Semana */
.wp-agendamento-weekdays-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #4d6278;
    margin-bottom: 12px;
}

/* Grade de Botões dos Dias */
.wp-agendamento-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px 4px;
    justify-items: center;
}

.wp-agendamento-day {
    width: 40px;
    height: 40px;
    background: #f0f6ff;
    border: none;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 600;
    color: #0066ff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.2s ease;
}

.wp-agendamento-day:hover:not(.disabled):not(.empty) {
    background: #0066ff;
    color: #ffffff;
}

.wp-agendamento-day.selected {
    background: #0066ff !important;
    color: #ffffff !important;
    font-weight: 700;
}

.wp-agendamento-day.disabled {
    background: transparent;
    color: #1a1a1a;
    font-weight: 400;
    cursor: default;
}

.wp-agendamento-day.empty {
    background: transparent;
    cursor: default;
}

/* Ponto indicativo do dia atual */
.wp-agendamento-day.is-today::after {
    content: '';
    position: absolute;
    bottom: 4px;
    width: 4px;
    height: 4px;
    background: currentColor;
    border-radius: 50%;
}

/* Fuso Horário */
.wp-agendamento-timezone-box {
    margin-top: 32px;
}

.wp-agendamento-tz-label {
    font-size: 13px;
    font-weight: 700;
    color: #0a2540;
    display: block;
    margin-bottom: 6px;
}

.wp-agendamento-tz-value {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #0a2540;
    cursor: pointer;
}

.wp-agendamento-tz-caret {
    font-size: 10px;
    margin-left: 2px;
}

/* =========================================================================
   PAINEL DE HORÁRIOS (SLOTS)
   ========================================================================= */

.wp-agendamento-slots-box {
    width: 220px;
    display: none;
    flex-direction: column;
}

#wp-agendamento-widget.has-date-selected .wp-agendamento-slots-box {
    display: flex;
}

.wp-agendamento-slots-header {
    font-size: 14px;
    font-weight: 600;
    color: #4d6278;
    margin-bottom: 16px;
}

.wp-agendamento-slots-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 6px;
}

.wp-agendamento-slot-btn {
    width: 100%;
    padding: 12px 14px;
    background: #ffffff;
    border: 1px solid #0066ff;
    border-radius: 4px;
    color: #0066ff;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
}

.wp-agendamento-slot-btn:hover {
    background: #0066ff;
    color: #ffffff;
}

/* =========================================================================
   ETAPAS DE FORMULÁRIO E SUCESSO
   ========================================================================= */

.wp-agendamento-back-to-slots {
    background: transparent;
    border: none;
    color: #0066ff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    margin-bottom: 24px;
}

.wp-agendamento-summary-box {
    background: #f8fafc;
    border-left: 4px solid #0066ff;
    padding: 16px;
    border-radius: 0 4px 4px 0;
    margin-bottom: 24px;
    font-size: 14px;
}

.wp-agendamento-form-group {
    margin-bottom: 18px;
}

.wp-agendamento-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #0a2540;
}

.wp-agendamento-form-group input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    font-size: 14px;
}

.wp-agendamento-form-group input:focus {
    outline: none;
    border-color: #0066ff;
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.15);
}

.wp-agendamento-submit-btn {
    width: 100%;
    padding: 12px;
    background: #0066ff;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.wp-agendamento-submit-btn:hover:not(:disabled) {
    background: #0052cc;
}

.wp-agendamento-step-success {
    text-align: center;
    padding: 40px 20px;
}

.wp-agendamento-success-icon {
    width: 54px;
    height: 54px;
    background: #d1fae5;
    color: #10b981;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 16px;
}

.wp-agendamento-success-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

/* Responsividade Mobile */
@media (max-width: 820px) {
    .wp-agendamento-card-body {
        flex-direction: column;
    }
    .wp-agendamento-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e8e8e8;
        padding: 24px;
    }
    .wp-agendamento-picker-grid {
        flex-direction: column;
    }
    .wp-agendamento-calendar-box {
        min-width: 100%;
    }
    .wp-agendamento-slots-box {
        width: 100%;
    }
}

/* Cabeçalho do Calendário (Título do Mês + Botões) */
.wp-agendamento-calendar-header,
.wp-agendamento-month-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 16px !important;
    width: 100% !important;
}

.wp-agendamento-month-title {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    text-transform: capitalize !important;
}

/* Reset de Padding/Border nos Botões de Navegação de Mês */
.wp-agendamento-nav-btn {
    background: transparent !important;
    border: none !important;
    border-radius: 50% !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    padding: 0 !important; /* Anula o padding do reset.css */
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    color: #0066ff !important;
    box-shadow: none !important;
    outline: none !important;
    line-height: 1 !important;
    transition: background-color 0.2s ease, color 0.2s ease !important;
}

.wp-agendamento-nav-btn:hover {
    background-color: #f1f5f9 !important;
    color: #0046b8 !important;
}

.wp-agendamento-nav-btn:disabled {
    opacity: 0.3 !important;
    cursor: not-allowed !important;
}

/* Garantia de exibição do Ícone SVG */
.wp-agendamento-nav-btn svg {
    width: 14px !important;
    height: 14px !important;
    stroke: currentColor !important;
    stroke-width: 2.5 !important;
    fill: none !important;
    display: block !important;
    pointer-events: none !important;
}