/* ==============================> GENERAL */
:root {
    --pd-primary: var(--e-global-color-primary, #0073aa);
    --pd-text: #333;
    --pd-bg-modal: rgba(0, 0, 0, 0.6);
}

.pd-btn-principal {
    background-color: var(--e-global-color-primary) !important;
    color: #fff !important;
    border: none !important;
    padding: 12px 25px !important;
    font-size: 16px !important;
    border-radius: 5px !important;
    cursor: pointer !important;
    transition: opacity 0.3s !important;
    font-weight: 600 !important;
}

.pd-btn-principal:hover {
    opacity: 0.9;
}

/* ==============================> MODAL / POPUP */
.pd-modal {
    display: none;
    /* Oculto por defecto */
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: var(--pd-bg-modal);
    justify-content: center;
    align-items: center;
}

.pd-modal.pd-show {
    display: flex;
    /* Flex para centrar */
}

.pd-modal-content {
    background-color: #fefefe;
    padding: 30px;
    border: 1px solid #888;
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: pdFadeIn 0.3s;
}

@keyframes pdFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pd-modal-close,
.pd-modal-close-exito {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 10px;
}

.pd-modal-close:hover,
.pd-modal-close:focus {
    color: #000;
    text-decoration: none;
}

.pd-modal-titulo {
    margin-top: 0;
    text-align: center;
    color: var(--pd-text);
}

/* ==============================> FORMULARIO DENTRO DEL MODAL */
.pd-formulario-testimonio label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 14px;
}

.pd-grupo-input {
    margin-bottom: 15px;
}

.pd-fila-doble {
    display: flex;
    gap: 15px;
}

.pd-fila-doble .pd-grupo-input {
    flex: 1;
}

.pd-formulario-testimonio input[type="text"],
.pd-formulario-testimonio input[type="email"],
.pd-formulario-testimonio input[type="tel"],
.pd-formulario-testimonio textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    /* Importante para que no se salga */
}

.pd-boton-enviar {
    background-color: var(--e-global-color-primary) !important;
    color: #fff !important;
    border: none !important;
    padding: 12px 20px !important;
    font-size: 16px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    width: 100% !important;
    margin-top: 10px !important;
}

.pd-mensaje-error {
    color: #d8000c;
    background-color: #ffd2d2;
    padding: 10px;
    margin-top: 10px;
    border-radius: 4px;
    font-size: 13px;
    text-align: center;
}

/* Selector de Estrellas */
.pd-rating-selector {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    /* A la izquierda */
}

.pd-rating-selector input {
    display: none;
}

.pd-rating-selector label {
    font-size: 28px;
    color: #ccc;
    cursor: pointer;
    margin: 0;
    padding: 0 2px;
}

.pd-rating-selector input:checked~label,
.pd-rating-selector label:hover,
.pd-rating-selector label:hover~label {
    color: #FFD700;
}

/* ==============================> POPUP DE EXITO */
.pd-content-exito {
    text-align: center;
    border-top: 5px solid #28a745;
}

.pd-icono-check {
    width: 60px;
    height: 60px;
    background: #28a745;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin: 0 auto 15px auto;
}

/* ==============================> CARRUSEL */
.pd-carrusel-contenedor {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 20px 0;
}

.pd-carrusel-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 20px;
    scrollbar-width: none;
}

.pd-carrusel-track::-webkit-scrollbar {
    display: none;
}

/* Tarjeta */
.pd-tarjeta-testimonio {
    flex: 0 0 calc(25% - 15px);
    /* 4 items */
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
}

/* Header Tarjeta */
.pd-tarjeta-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.pd-origen-icon {
    width: 20px;
    height: 20px;
}

.pd-estrellas {
    color: #FFD700;
    font-size: 16px;
}

.pd-estrellas .vacia {
    color: #e0e0e0;
}

/* SCROLL INTERNO TEXTO */
.pd-scroll-content {
    font-size: 14px;
    line-height: 1.5;
    color: #555;
    margin-bottom: 15px;
    flex-grow: 1;

    /* Propiedades de Scroll */
    max-height: 120px;
    /* Altura fija para el texto */
    overflow-y: auto;
    /* Scroll vertical si excede */
    padding-right: 5px;
    /* Espacio para el scrollbar */
}

/* Estilo del scrollbar interno (Webkit) */
.pd-scroll-content::-webkit-scrollbar {
    width: 4px;
}

.pd-scroll-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.pd-scroll-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

/* Footer Tarjeta */
.pd-tarjeta-footer {
    font-weight: 700;
    font-size: 15px;
    color: #333;
    margin-top: auto;
}

/* Controles */
.pd-carrusel-controles {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.pd-carrusel-controles button {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 18px;
}

.pd-carrusel-controles button:hover {
    background: var(--e-global-color-primary);
    color: #fff;
    border-color: var(--e-global-color-primary);
}

/* Responsive */
@media (max-width: 1024px) {
    .pd-tarjeta-testimonio {
        flex: 0 0 calc(50% - 10px);
    }
}

@media (max-width: 768px) {
    .pd-tarjeta-testimonio {
        flex: 0 0 100%;
    }

    .pd-fila-doble {
        flex-direction: column;
        gap: 0;
    }
}