/* public_html/css/profile_style.css */

:root {
    --title-font: 'Raleway', sans-serif;
    --body-font: 'Roboto', sans-serif;
    --text-primary-color: #ffffff; /* Fallback */
    --text-secondary-color: #cccccc; /* Fallback */
}

body.profile-page {
    font-family: var(--body-font);
    color: var(--text-secondary-color);
    margin: 0;
    padding: 0;
    transition: background-color 0.5s ease;
}

.profile-container {
    max-width: 680px;
    margin: 0 auto;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

.profile-header {
    text-align: center;
    margin-bottom: 2rem;
    width: 100%;
}

.profile-picture {
    width: 120px;
    height: 120px;
    object-fit: cover;
    margin-bottom: 1rem;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.profile-picture.square { border-radius: 16px; }

.profile-display-name {
    font-family: var(--title-font);
    font-size: 2rem;
    font-weight: 800;
    margin: 0;
    color: var(--text-primary-color);
}

/* --- INICIO: Estilos para Bio Expandible --- */
.profile-bio {
    font-size: 1rem;
    margin-top: 0.5rem;
    white-space: pre-wrap;
    max-height: 6.5em; /* Limita la altura a aprox. 4-5 líneas */
    overflow: hidden;
    transition: max-height 0.5s ease-in-out;
    position: relative;
}
.profile-bio.expanded {
    max-height: 1000px; /* Un valor alto para permitir la expansión completa */
}
.see-more-btn {
    background: none;
    border: none;
    color: var(--text-primary-color);
    font-weight: 700;
    cursor: pointer;
    padding: 0.25rem;
    margin-top: 0.5rem;
    text-decoration: underline;
}
/* --- FIN: Estilos para Bio Expandible --- */

.social-icons-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    width: 100%;
}

.social-icon-link {
    font-size: 1.5rem;
    color: var(--text-primary-color); /* Hereda el color principal */
    text-decoration: none;
    transition: transform 0.2s ease;
}
.social-icon-link:hover { transform: scale(1.1); }

/* --- INICIO: Estilos para Widgets Embebidos --- */
.profile-block-widget {
    width: 100%;
    margin-bottom: 1rem;
}
.widget-title {
    font-weight: 700;
    margin-bottom: 0.75rem;
    text-align: left;
    color: var(--text-primary-color);
}
.widget-embed-container {
    position: relative;
    padding-bottom: 56.25%; /* Proporción 16:9 para videos */
    height: 0;
    overflow: hidden;
    width: 100%;
    border-radius: 12px;
}
.widget-embed-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
/* --- FIN: Estilos para Widgets Embebidos --- */

.content-blocks-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.profile-block-button {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-radius: 8px;
    text-decoration: none;
    transition: transform 0.2s ease;
    border: 1px solid rgba(255,255,255,0.2);
}
.profile-block-button:hover { transform: scale(1.02); }

.block-button-content { flex-grow: 1; text-align: center; }
.block-button-title { font-weight: 700; font-size: 1.1rem; }

.profile-footer {
    margin-top: auto;
    padding-top: 3rem;
    text-align: center;
}
.footer-logo {
    width: 100px;
    height: auto;
    filter: brightness(0) invert(1);
    opacity: 0.8;
    transition: opacity 0.2s ease;
}
.footer-logo:hover { opacity: 1; }

/* ... (todos los estilos anteriores permanecen igual) ... */

/* --- INICIO: Estilos para Carrusel de Productos (CORREGIDOS) --- */
.products-section {
    width: 100%;
    margin-bottom: 1.5rem;
}
.products-section-title {
    font-family: var(--title-font);
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: left;
    color: var(--text-primary-color);
    font-size: 1.25rem;
}
.product-carousel {
    width: 100%;
    padding: 10px 0;
    overflow: hidden; /* Importante para Swiper */
}
/* CAMBIO CLAVE: Definimos un ancho para cada slide */
.swiper-slide {
    width: 150px; /* Ancho fijo para cada producto, puedes ajustarlo */
}
.product-card {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: block;
    text-decoration: none;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}
.product-image-container {
    width: 100%;
    padding-top: 133.33%; /* Proporción 3:4 (vertical rectangular) */
    position: relative;
    background-color: transparent;
}
.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.product-cart-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}
.product-info {
    padding: 0.75rem;
    text-align: left;
}
.product-name {
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-secondary-color);
}
.product-price {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary-color);
}
/* --- INICIO: Estilos para Modal de Advertencia --- */
.warning-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex; justify-content: center; align-items: center;
    z-index: 3000; backdrop-filter: blur(8px);
    opacity: 0; /* <<<--- Esta línea lo hace invisible */
    visibility: hidden; /* <<<--- Esta línea lo oculta */
    transition: all 0.3s ease;
}
.warning-modal-overlay.visible { 
    opacity: 1; /* <<<--- El JavaScript añade esta clase para hacerlo visible */
    visibility: visible; 
}
/* public_html/css/profile_style.css */
/* ... (todos los estilos anteriores permanecen igual hasta la sección del modal) ... */

/* --- INICIO: Estilos para Modal de Advertencia (CORREGIDOS Y REFINADOS) --- */
.warning-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex; justify-content: center; align-items: center;
    z-index: 3000; backdrop-filter: blur(8px);
    opacity: 0; visibility: hidden; transition: all 0.3s ease;
}

.warning-modal-overlay.visible { 
    opacity: 1; 
    visibility: visible; 
}

.warning-modal-content {
    background: #2d3748; /* Fondo oscuro */
    color: white;
    padding: 2rem; 
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    width: 90%; 
    max-width: 400px; /* <<<--- CAMBIO: Ancho máximo para el modal --- */
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.warning-modal-icon { 
    font-size: 2.5rem; /* <<<--- CAMBIO: Icono más grande --- */
    color: #f6ad55; /* <<<--- CAMBIO: Color amarillo de alerta --- */
    margin-bottom: 1rem; 
}

.warning-modal-title { 
    font-size: 1.25rem; 
    font-weight: 700; 
    margin-bottom: 0.5rem; 
}

.warning-modal-text { 
    font-size: 0.9rem; 
    color: #a0aec0; /* Gris claro */ 
    margin-bottom: 1.5rem; 
}

.warning-modal-actions { 
    display: flex; 
    gap: 1rem; 
}

/* <<<--- INICIO: CAMBIO - Estilos de botones profesionales --- */
.warning-modal-actions button {
    flex: 1; 
    padding: 0.75rem; 
    border-radius: 8px;
    font-weight: 700; 
    border: none; 
    cursor: pointer; 
    transition: all 0.2s ease;
}

.warning-modal-accept { 
    background-color: #e53e3e; /* Rojo */ 
    color: white; 
}

.warning-modal-accept:hover { 
    background-color: #c53030; /* Rojo más oscuro */
}

.warning-modal-cancel { 
    background-color: #4a5568; /* Gris oscuro */ 
    color: white; 
}

.warning-modal-cancel:hover { 
    background-color: #2d3748; /* Gris más oscuro */
}


/* --- INICIO: NUEVOS ESTILOS PARA FORMULARIO DE DONACIÓN SIMPLIFICADO --- */
.donation-form-container {
    width: 100%;
    margin-bottom: 2rem;
}

#donation-form {
    display: flex;
    width: 100%;
    border-radius: 99px; /* Bordes de píldora */
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.amount-input-group {
    display: flex;
    align-items: center;
    flex-grow: 1; /* El grupo de input ocupa el espacio disponible */
}

.amount-input-group .currency-symbol {
    font-size: 1.2rem;
    font-weight: 700;
    padding: 0 1rem;
    color: var(--text-secondary-color);
    background-color: rgba(0,0,0,0.1);
    height: 100%;
    display: flex;
    align-items: center;
}

.amount-input-group .amount-input {
    width: 100%;
    font-size: 1.2rem;
    font-weight: 500;
    padding: 0.9rem 1rem;
    border: none;
    background-color: rgba(0,0,0,0.2);
    color: var(--text-primary-color);
    outline: none;
}

.amount-input::placeholder {
    color: var(--text-secondary-color);
    opacity: 0.7;
}

.donation-submit-btn {
    padding: 0.9rem 2rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 0; /* Sin bordes redondeados dentro del grupo */
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

/* --- INICIO: NUEVOS ESTILOS PARA MODAL DE CONFIRMACIÓN DE DONACIÓN --- */
.donation-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex; justify-content: center; align-items: center;
    z-index: 3000; backdrop-filter: blur(8px);
    opacity: 0; visibility: hidden; transition: all 0.3s ease;
}
.donation-modal-overlay.visible { 
    opacity: 1; 
    visibility: visible; 
}
.donation-modal-content {
    background: #1e1e1e; /* Fondo oscuro para el modal */
    color: white;
    padding: 2rem; border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    width: 90%; max-width: 420px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: scale(0.95); transition: transform 0.3s ease;
}
.donation-modal-overlay.visible .donation-modal-content {
    transform: scale(1);
}
.donation-modal-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1.5rem;
}
.donation-modal-title { font-size: 1.25rem; font-weight: 700; margin: 0; }
.donation-modal-close-btn { background: none; border: none; font-size: 1.75rem; color: #a0aec0; cursor: pointer; }

.donation-summary { text-align: center; margin-bottom: 1.5rem; }
.donation-summary .amount-display { font-size: 2.5rem; font-weight: 800; color: var(--text-primary-color); }
.donation-summary .frequency-display { font-size: 1rem; color: var(--text-secondary-color); }

/* Usamos los estilos del .frequency-toggle que ya teníamos */
.modal-body .frequency-toggle { margin-bottom: 1.5rem; }
/* ============================================= */
/* == Donation Modal & Status Styles == */
/* ============================================= */



/* --- Estilos Específicos para el Modal de Donación --- */
.donation-modal h4 {
    font-family: var(--title-font, 'Raleway', sans-serif);
    color: #fff;
    font-size: 24px;
    margin-top: 20px;
    margin-bottom: 8px;
    text-align: left;
    font-weight: 700;
}

.donation-modal p {
    font-family: var(--body-font, 'Roboto', sans-serif);
    color: #a7a7a7;
    font-size: 18px;
    text-align: left;
    margin-bottom: 12px;
}

.donation-summary {
    font-family: var(--body-font, 'Roboto', sans-serif);
    color: #fff;
    font-size: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 16px;
}

.tip-options, .frequency-options {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.tip-btn, .freq-btn {
    flex-grow: 1;
    padding: 10px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    border: 1px solid #ccc;
    background-color: #f9f9f9;
    color: #555;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 1em;
}

.tip-btn:hover, .freq-btn:hover {
    border-color: #888;
    background-color: #f0f0f0;
}

.tip-btn.active, .freq-btn.active {
    background-color: #96f0b6;
    color: #555;
    border-color:  #781bff;
    font-weight: 700;
}

.custom-tip-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 0 12px;
}
.custom-tip-wrapper:focus-within {
    border-color: var(--text-primary-color, #781bff);
}

.custom-tip-wrapper span {
    font-size: 16px;
    color: #fff;
}

#custom-tip-amount {
    border: none;
    outline: none;
    width: 100%;
    padding: 10px 8px;
    background: transparent;
    font-size: 16px;
    color: white;
}

.donation-status-box {
    display: flex;
    align-items: flex-start;
    padding: 16px;
    margin: 20px auto;
    width: 90%;
    max-width: 550px;
    border-radius: 12px;
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-left: 6px solid;
    position: relative;
    overflow: hidden;
    animation: slideInFromTop 0.5s ease-out forwards;
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- ESTILOS PARA EL MENSAJE DE ÉXITO --- */
.donation-status-box.success {
    border-left-color: #28a745; /* Verde Éxito */
    background-color: #f0fff4; /* Fondo muy claro */
}
.donation-status-box.success .icon,
.donation-status-box.success h4 {
    color: #28a745;
}
.donation-status-box.success p {
    color: #155724; /* Texto oscuro para contraste */
}


/* --- INICIO DE LA CORRECCIÓN: ESTILOS PARA EL MENSAJE DE CANCELACIÓN --- */
.donation-status-box.cancel {
    border-left-color: #dc3545; /* Rojo Cancelación */
    background-color: #fff5f5; /* Fondo muy claro */
}
.donation-status-box.cancel .icon,
.donation-status-box.cancel h4 {
    color: #dc3545;
}
.donation-status-box.cancel p {
    color: #721c24; /* Texto oscuro para contraste */
}
/* --- FIN DE LA CORRECCIÓN --- */


.donation-status-box .icon {
    font-size: 28px;
    margin-right: 15px;
    margin-top: 2px;
    line-height: 1.2;
}

.donation-status-box .message-content {
    flex-grow: 1;
    text-align: left;
}

.donation-status-box h4 {
    margin: 0 0 4px 0;
    font-family: var(--title-font, 'Raleway', sans-serif);
    font-weight: 700;
    font-size: 18px;
}

.donation-status-box p {
    margin: 0;
    font-family: var(--body-font, 'Roboto', sans-serif);
    font-size: 15px;
    line-height: 1.5;
}

.donation-status-box .close-btn {
    position: absolute;
    top: 8px;
    right: 12px;
    border: none;
    background: transparent;
    font-size: 24px;
    font-weight: bold;
    
    opacity: 0.5;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: opacity 0.2s ease;
}

.donation-status-box .close-btn:hover {
    opacity: 1;
}