/* =====================================================
   AGENDA
===================================================== */

.slp-agenda-container {
    width: 100%;
}

.slp-agenda-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.slp-agenda-navigation {
    display: flex;
    align-items: center;
    gap: 10px;
}

.slp-agenda-navigation button {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 10px;
    background: #F1F5F9;
    color: #0F172A;
    cursor: pointer;
    font-size: 18px;
}

.slp-agenda-navigation button:hover {
    background: #E2E8F0;
}

.slp-agenda-month {
    min-width: 180px;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    color: #0F172A;
}

.slp-agenda-views {
    display: flex;
    gap: 5px;
    padding: 4px;
    background: #F1F5F9;
    border-radius: 10px;
}

.slp-agenda-view {
    border: 0;
    background: transparent;
    padding: 9px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #64748B;
}

.slp-agenda-view.active {
    background: #FFFFFF;
    color: #2563EB;
    box-shadow: 0 2px 6px rgba(15, 23, 42, .08);
}


/* =====================================================
   CALENDARIO
===================================================== */

.slp-calendar {
    width: 100%;
    background: #FFFFFF;
    border-radius: 18px;
    box-shadow: 0 8px 30px rgba(15, 23, 42, .07);
    overflow: hidden;
}

/*
 * Cabecera y cuerpo utilizan exactamente la misma rejilla.
 * minmax(0, 1fr) + min-width:0 evita que una cita larga
 * ensanche una columna y desplace las demás.
 */
.slp-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    background: #F8FAFC;
    border-bottom: 1px solid #E2E8F0;
    box-sizing: border-box;
}

.slp-calendar-weekday {
    min-width: 0;
    box-sizing: border-box;
    padding: 14px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: #64748B;
    text-transform: uppercase;

    /* La línea continúa exactamente por el centro de cada columna. */
    border-right: 1px solid #E2E8F0;
}

.slp-calendar-weekday:last-child {
    border-right: 0;
}

.slp-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    min-width: 0;
}

.slp-calendar-day {
    min-width: 0;
    min-height: 125px;
    padding: 10px;
    box-sizing: border-box;
    border-right: 1px solid #E2E8F0;
    border-bottom: 1px solid #E2E8F0;
    background: #FFFFFF;
}

.slp-calendar-day:nth-child(7n) {
    border-right: 0;
}

.slp-calendar-day.empty {
    background: #F8FAFC;
}

.slp-calendar-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin-bottom: 6px;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

.slp-calendar-day.today .slp-calendar-number {
    background: #2563EB;
    color: #FFFFFF;
}



/* =====================================================
   CITAS
===================================================== */

.slp-calendar-event {
    display: block;
    width: 100%;
    margin-bottom: 5px;
    padding: 7px 8px;
    box-sizing: border-box;
    border: 0;
    border-radius: 8px;
    background: #DBEAFE;
    color: #1D4ED8;
    text-align: left;
    cursor: pointer;
    font-size: 12px;
}

.slp-calendar-event:hover {
    background: #BFDBFE;
}

.slp-calendar-event-time {
    display: block;
    font-weight: 700;
}

.slp-calendar-event-contact {
    display: block;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* =====================================================
   MOVIL
===================================================== */

@media (max-width: 768px) {

    .slp-agenda-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .slp-agenda-navigation {
        justify-content: center;
    }

    .slp-agenda-views {
        justify-content: center;
    }

    .slp-calendar {
        overflow-x: auto;
    }

    .slp-calendar-weekdays,
    .slp-calendar-grid {
        width: 700px;
        min-width: 700px;
    }

    .slp-calendar-day {
        min-height: 110px;
    }

}

/* =====================================================
   ACCIONES DE CITA
===================================================== */

.slp-event-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #E2E8F0;
}

.slp-event-actions form {
    margin: 0;
}


.slp-btn-success,
.slp-btn-danger {
    border: 0;
    border-radius: 9px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}


.slp-btn-success {
    background: #DCFCE7;
    color: #15803D;
}


.slp-btn-success:hover {
    background: #BBF7D0;
}


.slp-btn-danger {
    background: #FEE2E2;
    color: #DC2626;
}


.slp-btn-danger:hover {
    background: #FECACA;
}

/* =====================================================
   ESTADOS DE LAS CITAS
===================================================== */

.slp-calendar-event.slp-event-done {
    background: #DCFCE7;
    color: #15803D;
}


.slp-calendar-event.slp-event-done:hover {
    background: #BBF7D0;
}


.slp-calendar-event.slp-event-cancelled {
    background: #FEE2E2;
    color: #DC2626;
    text-decoration: line-through;
}


.slp-calendar-event.slp-event-cancelled:hover {
    background: #FECACA;
}

/* =====================================================
   MODAL DETALLE DE CITA - DISEÑO FINAL
===================================================== */

.slp-event-detail-box {
    position: relative;
    width: min(620px, calc(100vw - 30px));
    max-width: 620px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    box-sizing: border-box;
    padding: 32px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 25px 70px rgba(15, 23, 42, 0.25);
}

/* Botones inferiores del detalle de cita */
#slp-event-detail-modal .slp-modal-buttons {
    grid-template-columns: 1fr 1fr 1fr;
}

/* =====================================================
   BOTÓN X
===================================================== */

.slp-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    padding: 0;

    border: 0;
    border-radius: 50%;

    background: #f1f5f9;
    color: #334155;

    font-family: Arial, sans-serif;
    font-size: 25px;
    font-weight: 400;
    line-height: 1;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.slp-modal-close:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: scale(1.05);
}

.slp-modal-close:active {
    transform: scale(0.96);
}


/* =====================================================
   CABECERA
===================================================== */

.slp-event-detail-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;

    padding-right: 55px;
    margin-bottom: 25px;
}

.slp-event-detail-icon {
    flex: 0 0 52px;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 52px;
    height: 52px;

    border-radius: 14px;

    background: #eff6ff;

    font-size: 25px;
}

.slp-event-detail-header h2 {
    margin: 0 0 7px;

    color: #0f172a;

    font-size: 27px;
    font-weight: 700;
}

.slp-event-detail-header p {
    margin: 0;

    color: #64748b;

    font-size: 15px;
}


/* =====================================================
   INFORMACIÓN
===================================================== */

.slp-event-detail-content {
    display: flex;
    flex-direction: column;
    gap: 0;
}


.slp-detail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    min-height: 46px;

    gap: 20px;

    padding: 8px 0;

    border-bottom: 1px solid #e2e8f0;
}


.slp-detail-label {
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
}


.slp-detail-row strong,
.slp-detail-row span:last-child {
    color: #0f172a;
    font-size: 15px;
    text-align: right;
}


/* =====================================================
   ESTADO
===================================================== */

.slp-badge {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;

    padding: 7px 13px;

    border-radius: 999px;

    background: #dbeafe;
    color: #2563eb !important;

    font-size: 13px !important;
    font-weight: 700;
}


/* =====================================================
   NOTAS
===================================================== */

.slp-detail-notes {
    margin-top: 15px;
    padding: 16px;

    border-radius: 13px;

    background: #f8fafc;
}

.slp-detail-notes .slp-detail-label {
    display: block;
    margin-bottom: 7px;
}

.slp-detail-notes p {
    margin: 0;

    color: #475569;

    font-size: 14px;
    line-height: 1.6;
}

/* =====================================================
   ACCIONES DE LA CITA
===================================================== */

.slp-event-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;

    width: 100%;

    margin-top: 25px;
    padding-top: 22px;

    border-top: 1px solid #e2e8f0;
    box-sizing: border-box;
}

.slp-event-actions form {
    display: contents;
}

.slp-event-actions button {
    width: 100%;
    min-width: 0;
}


/* =====================================================
   WHATSAPP - ANCHO COMPLETO
===================================================== */

#slp-whatsapp-reminder {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
}



/* =====================================================
   BOTONES DE ESTADO
===================================================== */

.slp-btn-success,
.slp-btn-danger,
.slp-btn-delete {
    box-sizing: border-box;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-width: 0;
    min-height: 58px;

    padding: 10px 14px;

    border-radius: 14px;

    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;

    text-align: center;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.15s ease,
        box-shadow 0.2s ease;
}

.slp-btn-success:hover,
.slp-btn-danger:hover,
.slp-btn-delete:hover {
    transform: translateY(-1px);
}


/* =====================================================
   MARCAR REALIZADA
===================================================== */

.slp-btn-success {
    border: 1px solid #bbf7d0;

    background: #dcfce7;
    color: #15803d;
}

.slp-btn-success:hover {
    background: #bbf7d0;
    box-shadow: 0 4px 12px rgba(21, 128, 61, 0.12);
}


/* =====================================================
   CANCELAR CITA
===================================================== */

.slp-btn-danger {
    border: 1px solid #fecaca;

    background: #fee2e2;
    color: #dc2626;
}

.slp-btn-danger:hover {
    background: #fecaca;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.10);
}


/* =====================================================
   ELIMINAR CITA
===================================================== */

.slp-btn-delete {
    border: 1px solid #fecaca !important;

    background: #ffffff !important;
    color: #dc2626 !important;
}

.slp-btn-delete:hover {
    background: #fef2f2 !important;
    border-color: #fca5a5 !important;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.08) !important;
}


/* =====================================================
   BOTONES INFERIORES
===================================================== */

.slp-modal-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);

    gap: 12px;

    width: 100%;

    margin-top: 20px;
}

.slp-modal-buttons button {
    box-sizing: border-box;

    width: 100%;
    min-height: 54px;

    padding: 11px 20px;

    border-radius: 14px;

    font-family: inherit;
    font-size: 14px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.15s ease,
        box-shadow 0.2s ease;
}

.slp-modal-buttons button:hover {
    transform: translateY(-1px);
}


/* =====================================================
   CERRAR
===================================================== */

.slp-modal-buttons .slp-btn-secondary {
    border: 0;

    background: #e2e8f0;
    color: #334155;
}

.slp-modal-buttons .slp-btn-secondary:hover {
    background: #cbd5e1;
}


/* =====================================================
   EDITAR CITA
===================================================== */

.slp-modal-buttons .slp-btn {
    border: 0;

    background: #2563eb;
    color: #ffffff;
}

.slp-modal-buttons .slp-btn:hover {
    background: #1d4ed8;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.20);
}


/* =====================================================
   CITAS EN EL CALENDARIO
===================================================== */

.slp-calendar-event {
    box-sizing: border-box;

    width: calc(100% - 10px);

    margin: 4px 5px;
    padding: 7px 9px;

    border: 0;
    border-radius: 8px;

    background: #dbeafe;
    color: #1d4ed8;

    text-align: left;

    cursor: pointer;

    transition:
        transform 0.15s ease,
        background 0.15s ease;
}

.slp-calendar-event:hover {
    background: #bfdbfe;
    transform: translateY(-1px);
}


.slp-calendar-event-time {
    display: block;

    margin-bottom: 2px;

    font-size: 12px;
    font-weight: 700;
}


.slp-calendar-event-contact {
    display: block;

    overflow: hidden;

    font-size: 12px;
    font-weight: 500;

    text-overflow: ellipsis;
    white-space: nowrap;
}


/* =====================================================
   CITA REALIZADA
===================================================== */

.slp-calendar-event.slp-event-done {
    background: #dcfce7;
    color: #15803d;
}

.slp-calendar-event.slp-event-done:hover {
    background: #bbf7d0;
}


/* =====================================================
   CITA CANCELADA
===================================================== */

.slp-calendar-event.slp-event-cancelled {
    background: #fee2e2;
    color: #dc2626;

    text-decoration: line-through;
}

.slp-calendar-event.slp-event-cancelled:hover {
    background: #fecaca;
}


/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 700px) {

    .slp-event-detail-box {
        width: calc(100vw - 24px);

        max-height: calc(100vh - 24px);

        padding: 24px;

        border-radius: 18px;
    }


    .slp-event-actions {
        grid-template-columns: 1fr;
    }


    .slp-modal-buttons {
        flex-direction: column-reverse;
        align-items: stretch;
    }


    .slp-modal-buttons button {
        width: 100%;
    }


    .slp-detail-row {
        align-items: flex-start;
        flex-direction: column;

        gap: 4px;
    }


    .slp-detail-row strong,
    .slp-detail-row span:last-child {
        text-align: left;
    }

}

/* =====================================================
   VISTA SEMANA
===================================================== */

.slp-week-calendar {
    width: 100%;
    overflow: auto;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #ffffff;
}


/* =====================================================
   CABECERA SEMANA
===================================================== */

.slp-week-header {
    display: grid;

    grid-template-columns:
        70px
        repeat(7, minmax(120px, 1fr));

    min-width: 910px;

    position: sticky;
    top: 0;
    z-index: 5;

    border-bottom: 1px solid #e2e8f0;

    background: #ffffff;
}


.slp-week-time-column {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 64px;

    border-right: 1px solid #e2e8f0;

    color: #94a3b8;

    font-size: 12px;
    font-weight: 600;
}


.slp-week-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-height: 64px;

    gap: 3px;

    border-right: 1px solid #e2e8f0;

    color: #475569;
}


.slp-week-day:last-child {
    border-right: 0;
}


.slp-week-day-name {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}


.slp-week-day-number {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 30px;
    height: 30px;

    border-radius: 50%;

    font-size: 15px;
    font-weight: 700;
}


.slp-week-day.today {
    background: #eff6ff;
    color: #2563eb;
}


.slp-week-day.today
.slp-week-day-number {
    background: #2563eb;
    color: #ffffff;
}


/* =====================================================
   CUERPO SEMANA
===================================================== */

.slp-week-grid {
    min-width: 910px;
}


.slp-week-row {
    display: grid;

    grid-template-columns:
        70px
        repeat(7, minmax(120px, 1fr));

    min-height: 78px;

    border-bottom: 1px solid #f1f5f9;
}


.slp-week-row:last-child {
    border-bottom: 0;
}


.slp-week-time {
    display: flex;
    align-items: flex-start;
    justify-content: center;

    padding-top: 10px;

    border-right: 1px solid #e2e8f0;

    color: #94a3b8;

    font-size: 12px;
    font-weight: 500;
}


.slp-week-cell {
    position: relative;

    min-height: 78px;

    padding: 4px;

    border-right: 1px solid #f1f5f9;

    background: #ffffff;

    transition:
        background 0.15s ease;
}


.slp-week-cell:last-child {
    border-right: 0;
}


.slp-week-cell:hover {
    background: #f8fafc;
}


/* =====================================================
   CITAS SEMANA
===================================================== */

.slp-week-cell
.slp-calendar-event {
    width: 100%;

    margin: 0 0 4px;

    padding: 7px 8px;

    border-radius: 8px;

    text-align: left;

    box-sizing: border-box;
}


.slp-week-cell
.slp-calendar-event-time {
    font-size: 11px;
}


.slp-week-cell
.slp-calendar-event-contact {
    font-size: 12px;
}


/* =====================================================
   VISTA DÍA
===================================================== */

.slp-day-calendar {
    width: 100%;

    border: 1px solid #e2e8f0;

    border-radius: 16px;

    overflow: hidden;

    background: #ffffff;
}


.slp-day-header {
    padding: 18px 22px;

    border-bottom: 1px solid #e2e8f0;

    background: #ffffff;

    color: #0f172a;

    font-size: 18px;
    font-weight: 700;
}


.slp-day-grid {
    max-height: 700px;

    overflow-y: auto;
}


/* =====================================================
   FILAS DÍA
===================================================== */

.slp-day-row {
    display: grid;

    grid-template-columns: 80px minmax(0, 1fr);

    min-height: 82px;

    border-bottom: 1px solid #f1f5f9;
}


.slp-day-row:last-child {
    border-bottom: 0;
}


.slp-day-time {
    display: flex;
    align-items: flex-start;
    justify-content: center;

    padding-top: 13px;

    border-right: 1px solid #e2e8f0;

    color: #94a3b8;

    font-size: 12px;
    font-weight: 500;
}


.slp-day-content {
    min-height: 82px;

    padding: 6px 10px;

    background: #ffffff;

    transition:
        background 0.15s ease;
}


.slp-day-content:hover {
    background: #f8fafc;
}


/* =====================================================
   CITAS EN VISTA DÍA
===================================================== */

.slp-day-content
.slp-calendar-event {
    width: 100%;

    margin: 0;

    padding: 10px 13px;

    border-radius: 10px;

    box-sizing: border-box;

    text-align: left;
}


.slp-day-content
.slp-calendar-event-time {
    display: inline-block;

    margin-right: 8px;

    font-size: 12px;
}


.slp-day-content
.slp-calendar-event-contact {
    display: inline-block;

    font-size: 14px;
}


/* =====================================================
   VISTA ACTIVA
===================================================== */

.slp-agenda-view {
    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}


.slp-agenda-view.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}


/* =====================================================
   BOTONES DE NAVEGACIÓN
===================================================== */

.slp-agenda-nav-button {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;

    padding: 0;

    border: 1px solid #e2e8f0;

    border-radius: 10px;

    background: #ffffff;

    color: #334155;

    font-size: 25px;
    line-height: 1;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}


.slp-agenda-nav-button:hover {
    background: #f8fafc;

    border-color: #cbd5e1;

    transform: translateY(-1px);
}


/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 900px) {

    .slp-week-calendar {
        border-radius: 12px;
    }


    .slp-week-header,
    .slp-week-row {
        grid-template-columns:
            60px
            repeat(7, 110px);
    }


    .slp-week-time-column,
    .slp-week-time {
        font-size: 11px;
    }


    .slp-day-row {
        grid-template-columns:
            65px minmax(0, 1fr);
    }

}


@media (max-width: 600px) {

    .slp-day-header {
        padding: 15px;

        font-size: 16px;
    }


    .slp-day-grid {
        max-height: 600px;
    }


    .slp-day-row {
        grid-template-columns:
            55px minmax(0, 1fr);

        min-height: 75px;
    }


    .slp-day-content {
        min-height: 75px;
    }


    .slp-day-content
    .slp-calendar-event-contact {
        font-size: 13px;
    }

}

/* ==========================================================
   MODAL DE AGENDA - AJUSTE PARA PANTALLAS PEQUEÑAS
   ========================================================== */

.slp-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;
    box-sizing: border-box;

    overflow-y: auto;
}


/* Caja del modal */

.slp-modal-box {
    width: 100%;
    max-width: 630px;

    max-height: calc(100vh - 40px);

    overflow-y: auto;

    box-sizing: border-box;

    margin: auto;
}


/* Modal de detalle */

.slp-event-detail-box {
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}


/* Formulario */

#slp-event-form {
    width: 100%;
}


/* En pantallas pequeñas */

@media (max-width: 700px) {

    .slp-modal {
        align-items: flex-start;
        padding: 15px;
    }

    .slp-modal-box {
        max-height: calc(100vh - 30px);
        margin: 0 auto;
    }

}


/* En pantallas muy pequeñas */

@media (max-height: 750px) {

    .slp-modal {
        align-items: flex-start;
        padding-top: 15px;
        padding-bottom: 15px;
    }

    .slp-modal-box {
        max-height: calc(100vh - 30px);
    }

}

/* ==========================================================
   CAPA DE CITAS - VISTA SEMANA
   ========================================================== */

.slp-week-grid {
    position: relative;
}


/*
|--------------------------------------------------------------------------
| CAPA GENERAL
|--------------------------------------------------------------------------
*/

.slp-week-events-overlay {
    position: absolute;

    top: 0;
    left: 70px;
    right: 0;
    bottom: 0;

    display: grid;

    grid-template-columns:
        repeat(7, minmax(120px, 1fr));

    pointer-events: none;

    z-index: 20;
}


/*
|--------------------------------------------------------------------------
| COLUMNA DE CADA DÍA
|--------------------------------------------------------------------------
*/

.slp-week-events-lane {
    position: relative;

    min-width: 0;

    height: 100%;

    pointer-events: none;
}


/*
|--------------------------------------------------------------------------
| CITAS
|--------------------------------------------------------------------------
*/

.slp-week-events-lane
.slp-calendar-event {

    position: absolute;

    pointer-events: auto;

    z-index: 30;

    overflow: hidden;

    margin: 0;

    padding: 6px 8px;

    width: calc(100% - 10px);

    box-sizing: border-box;

}


/*
|--------------------------------------------------------------------------
| TEXTO DE LAS CITAS
|--------------------------------------------------------------------------
*/

.slp-week-events-lane
.slp-calendar-event-time {

    display: block;

}


.slp-week-events-lane
.slp-calendar-event-contact {

    display: block;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

}


/*
|--------------------------------------------------------------------------
| MÓVIL
|--------------------------------------------------------------------------
*/

@media (max-width: 900px) {

    .slp-week-events-overlay {

        left: 60px;

        grid-template-columns:
            repeat(7, 110px);

    }

}

/* ==========================================================
   CAPA DE CITAS - VISTA DÍA
   ========================================================== */

.slp-day-grid {
    position: relative;
}


/*
|--------------------------------------------------------------------------
| CAPA GENERAL DE CITAS
|--------------------------------------------------------------------------
*/

.slp-day-events-overlay {

    position: absolute;

    top: 0;
    left: 80px;
    right: 0;
    bottom: 0;

    height: 1230px;

    pointer-events: none;

    z-index: 20;

}


/*
|--------------------------------------------------------------------------
| CITAS
|--------------------------------------------------------------------------
*/

.slp-day-events-overlay
.slp-calendar-event {

    position: absolute;

    pointer-events: auto;

    z-index: 30;

    overflow: hidden;

    margin: 0;

    padding: 7px 10px;

    width: calc(100% - 20px);

    box-sizing: border-box;

}


/*
|--------------------------------------------------------------------------
| HORA
|--------------------------------------------------------------------------
*/

.slp-day-events-overlay
.slp-calendar-event-time {

    display: inline-block;

    margin-right: 8px;

}


/*
|--------------------------------------------------------------------------
| CONTACTO
|--------------------------------------------------------------------------
*/

.slp-day-events-overlay
.slp-calendar-event-contact {

    display: inline-block;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

}

/* =====================================================
   FICHA DEL CONTACTO EN NUEVA CITA
===================================================== */

.slp-contact-info {
    margin-top: 10px;
    padding: 11px 14px;

    background: #f5f8fc;
    border: 1px solid #dbe5f0;
    border-radius: 12px;

    color: #475569;
    font-size: 13px;
    line-height: 1.4;

    box-sizing: border-box;
}

.slp-contact-info-name {
    display: flex;
    align-items: center;

    margin-bottom: 6px;

    color: #1e293b;
    font-size: 14px;
    font-weight: 600;
}

.slp-contact-info-phone,
.slp-contact-info-email {
    display: flex;
    align-items: center;

    margin-top: 3px;

    color: #64748b;
    font-size: 13px;
}

.slp-contact-info strong {
    font-weight: 600;
    color: #1e293b;
}

/* Ajuste de separación de los datos del contacto */

.slp-contact-info-name,
.slp-contact-info-phone,
.slp-contact-info-email {
    gap: 6px;
}

/* =====================================================
   BOTONES DEL DETALLE DE CITA
===================================================== */

#slp-event-detail-modal .slp-modal-buttons {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 12px !important;

    width: 100% !important;
    margin-top: 20px !important;

    visibility: visible !important;
    opacity: 1 !important;
}

#slp-event-detail-modal .slp-modal-buttons button {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;

    width: 100% !important;
    min-height: 54px !important;

    align-items: center !important;
    justify-content: center !important;
}

/* =========================================================
   DETALLE DE CITA - AJUSTE PARA MÓVIL
========================================================= */

@media (max-width: 600px) {

    /*
    ---------------------------------------------------------
    Botones de acciones principales
    ---------------------------------------------------------
    */

    #slp-event-detail-modal .slp-event-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }


    #slp-event-detail-modal .slp-event-actions button {
        width: 100%;
        min-height: 50px;
    }


    /*
    ---------------------------------------------------------
    Botones inferiores
    ---------------------------------------------------------
    */

    #slp-event-detail-modal .slp-modal-buttons {
        display: grid !important;

        grid-template-columns: 1fr 1fr !important;

        gap: 10px !important;

        width: 100% !important;
    }


    /*
    ---------------------------------------------------------
    Cerrar
    ---------------------------------------------------------
    */

    #slp-event-detail-modal
    #slp-close-event-detail-bottom {
        width: 100%;
        min-height: 54px;

        white-space: nowrap;
    }


    /*
    ---------------------------------------------------------
    Ver contacto
    ---------------------------------------------------------
    */

    #slp-event-detail-modal
    #slp-view-contact {
        width: 100%;
        min-height: 54px;

        white-space: nowrap;
    }


    /*
    ---------------------------------------------------------
    Editar cita
    ---------------------------------------------------------
    */

    #slp-event-detail-modal
    #slp-edit-event {

        width: 100%;

        min-height: 54px;

        grid-column: 1 / -1;

        white-space: nowrap;
    }

}

/* ==========================================================
   AJUSTE FINAL - BOTONES DEL DETALLE DE CITA
   ========================================================== */

/* Botones principales: siempre una sola línea */
#slp-event-detail-modal .slp-event-actions button {
    white-space: nowrap !important;
    word-break: keep-all !important;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* Botones inferiores */
#slp-event-detail-modal .slp-modal-buttons button {
    white-space: nowrap !important;
    word-break: keep-all !important;
}


/* Ver seguimiento: ocupa toda la fila */
#slp-event-detail-modal #slp-view-followup {
    grid-column: 1 / -1 !important;
}


/* ==========================================================
   PANTALLAS MEDIANAS
   ========================================================== */

@media (min-width: 601px) and (max-width: 900px) {

    #slp-event-detail-modal .slp-event-actions {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }


    #slp-event-detail-modal .slp-event-actions button {
        padding-left: 8px !important;
        padding-right: 8px !important;
        font-size: 13px !important;
    }


    #slp-event-detail-modal .slp-modal-buttons {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }


    #slp-event-detail-modal .slp-modal-buttons button {
        padding-left: 8px !important;
        padding-right: 8px !important;
        font-size: 13px !important;
    }

}


/* ==========================================================
   PANTALLAS PEQUEÑAS
   ========================================================== */

@media (max-width: 600px) {

    #slp-event-detail-modal .slp-event-actions {
        grid-template-columns: 1fr !important;
    }


    #slp-event-detail-modal .slp-event-actions button {
        white-space: nowrap !important;
    }


    #slp-event-detail-modal .slp-modal-buttons {
        grid-template-columns: 1fr 1fr !important;
    }


    #slp-event-detail-modal #slp-view-followup {
        grid-column: 1 / -1 !important;
    }

}

/* ==========================================================
   IGUALAR ALTURA DE LOS BOTONES DE ACCIÓN
   ========================================================== */

#slp-event-detail-modal .slp-event-actions button {
    height: 50px !important;
    min-height: 50px !important;
    box-sizing: border-box !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}


/* ==========================================================
   TAREAS - DISTRIBUCIÓN DE BOTONES
   ========================================================== */

/* Botones inferiores de una Tarea */
#slp-event-detail-modal[data-event-origen="tarea"] .slp-modal-buttons {
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
}

/* Todos los botones inferiores de la Tarea */
#slp-event-detail-modal[data-event-origen="tarea"] .slp-modal-buttons button {
    width: 100% !important;
}


/* ==========================================================
   TAREAS - MÓVIL
   ========================================================== */

@media (max-width: 600px) {

    #slp-event-detail-modal[data-event-origen="tarea"] .slp-modal-buttons {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

}

/* ==========================================================
   RECORDATORIO WHATSAPP
========================================================== */

#slp-event-detail-modal .slp-btn-whatsapp {

    background:#25D366;

    color:#FFFFFF;

    border:none;

    border-radius:10px;

    padding:12px 18px;

    min-height:48px;

    font-size:14px;

    font-weight:700;

    cursor:pointer;

    display:inline-flex;

    align-items:center;

    justify-content:center;

    transition:
        transform .2s ease,
        box-shadow .2s ease,
        background .2s ease;

}


#slp-event-detail-modal .slp-btn-whatsapp:hover {

    background:#1ebe5d;

    transform:translateY(-2px);

    box-shadow:
        0 6px 16px rgba(37,211,102,.25);

}


@media(max-width:600px){

    #slp-event-detail-modal .slp-btn-whatsapp {

        width:100%;

        min-height:50px;

    }

}

#slp-whatsapp-reminder {
    width: 100% !important;
    flex: 0 0 100% !important;
    display: none;
    box-sizing: border-box;
}

#slp-whatsapp-reminder {
    width: 100% !important;
    flex-basis: 100% !important;
}
