/**
 * Colabora Section Styles
 * Sección de donación con información de impacto y formulario
 * Basado en Figma: node 1030-31809
 */

.menudos-colabora-section {
    position: relative;
    width: 100%;
    padding: 50px 64px 70px;
    background-color: var(--wp--preset--color--light-gray, #F4F4F4);
    overflow: hidden;
}

/* Decorative circle */
.colabora-section__circle {
    position: absolute;
    left: -20%;
    bottom: -72%;
    width: 623px;
    height: 623px;
    border-radius: 50%;
    background-color: var(--wp--preset--color--accent, #FCC95B);
    opacity: 0.1;
    pointer-events: none;
}

/* Container */
.colabora-section__container {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    gap: 64px;
    max-width: 1440px;
    margin: 0 auto;
}

/* Left Column: Info */
.colabora-section__info {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
    max-width: 620px;
}

.colabora-section__header {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.colabora-section__title {
    margin: 0;
    font-family: var(--wp--preset--font-family--inter, 'Inter', sans-serif);
    font-size: 36px;
    font-weight: 700;
    line-height: 1.21;
    color: var(--wp--preset--color--text-dark, #333333);
}

.colabora-section__subtitle {
    margin: 0;
    font-family: var(--wp--preset--font-family--inter, 'Inter', sans-serif);
    font-size: 24px;
    font-weight: 500;
    line-height: 1.21;
    color: var(--wp--preset--color--text-gray, #4F4F4F);
}

/* Bullets */
.colabora-section__bullets {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.colabora-section__bullet {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.colabora-section__bullet-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: var(--wp--preset--color--accent, #FCC95B);
    margin-top: 2px;
}

.colabora-section__bullet-icon svg {
    width: 24px;
    height: 24px;
}

.colabora-section__bullet-text {
    font-family: var(--wp--preset--font-family--inter, 'Inter', sans-serif);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.21;
    color: var(--wp--preset--color--text-dark, #333333);
}

.colabora-section__bullet-text strong {
    display: block;
    font-size: 18px;
    font-weight: 700;
}

/* Right Column: Donation Card */
.colabora-section__card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 460px;
    flex-shrink: 0;
    padding: 24px;
    background-color: var(--wp--preset--color--white, #FFFFFF);
    border-radius: 16px;
    box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.12);
}

.colabora-section__card-title {
    margin: 0;
    font-family: var(--wp--preset--font-family--inter, 'Inter', sans-serif);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.21;
    color: var(--wp--preset--color--text-dark, #333333);
}

.colabora-section__card-subtitle {
    margin: 0;
    font-family: var(--wp--preset--font-family--inter, 'Inter', sans-serif);
    font-size: 18px;
    font-weight: 400;
    line-height: 1.21;
    color: var(--wp--preset--color--text-dark, #333333);
}

/* Donation Form */
.colabora-section__donation-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Amount Buttons */
.colabora-section__amounts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.colabora-section__amount-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    height: 48px;
    font-family: var(--wp--preset--font-family--inter, 'Inter', sans-serif);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.21;
    color: var(--wp--preset--color--text-dark, #333333);
    background-color: var(--wp--preset--color--white, #FFFFFF);
    border: 1px solid var(--wp--preset--color--secondary, #787878);
    border-radius: 24px;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.colabora-section__amount-btn:hover {
    background-color: var(--wp--preset--color--light-gray, #F5F5F5);
}

.colabora-section__amount-btn.is-selected {
    background-color: var(--wp--preset--color--primary, #D50032);
    border-color: var(--wp--preset--color--primary, #D50032);
    color: var(--wp--preset--color--white, #FFFFFF);
}

/* Custom Amount Input */
.colabora-section__custom-amount {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 16px;
}

.colabora-section__custom-label {
    font-family: var(--wp--preset--font-family--inter, 'Inter', sans-serif);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.21;
    color: var(--wp--preset--color--text-gray, #4F4F4F);
}

.colabora-section__custom-input-wrapper {
    position: relative;
}

.colabora-section__custom-input {
    width: 100%;
    max-width: 30%;
    padding: 8px 16px;
    font-family: var(--wp--preset--font-family--inter, 'Inter', sans-serif);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.21;
    color: var(--wp--preset--color--text-dark, #333333);
    background-color: var(--wp--preset--color--light-gray, #F4F4F4);
    border: none;
    border-radius: 16px;
    outline: none;
    transition: box-shadow 0.2s ease;
}

.colabora-section__custom-input::placeholder {
    color: var(--wp--preset--color--text-light, #787878);
    opacity: 0.64;
}

.colabora-section__custom-input:focus {
    box-shadow: 0 0 0 2px var(--wp--preset--color--primary, #D50032);
}

/* Remove number input arrows */
.colabora-section__custom-input::-webkit-outer-spin-button,
.colabora-section__custom-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.colabora-section__custom-input[type=number] {
    -moz-appearance: textfield;
}

/* Donate Button */
.colabora-section__donate-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 16px 24px;
    min-height: 48px;
    margin-top: 16px;
    font-family: var(--wp--preset--font-family--inter, 'Inter', sans-serif);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.21;
    color: var(--wp--preset--color--white, #FFFFFF);
    background-color: var(--wp--preset--color--primary, #D50032);
    border: none;
    border-radius: 24px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.colabora-section__donate-btn:hover {
    background-color: var(--wp--preset--color--primary-hover, #B0002A);
}

.colabora-section__donate-btn:active {
    transform: scale(0.98);
}

/* Responsive - Tablet */
@media (max-width: 1024px) {
    .menudos-colabora-section {
        padding: 48px 32px 56px;
    }

    .colabora-section__container {
        flex-direction: column;
        gap: 32px;
    }

    .colabora-section__info {
        max-width: 100%;
    }

    .colabora-section__card {
        width: 100%;
        max-width: 500px;
    }

    .colabora-section__title {
        font-size: 32px;
    }

    .colabora-section__subtitle {
        font-size: 20px;
    }

    .colabora-section__circle {
        left: -400px;
        bottom: -200px;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .menudos-colabora-section {
        padding: 40px 16px 48px;
    }

    .colabora-section__container {
        gap: 24px;
    }

    .colabora-section__title {
        font-size: 28px;
        text-align: center;
    }

    .colabora-section__subtitle {
        font-size: 18px;
        text-align: center;
    }

    .colabora-section__card {
        padding: 20px;
    }

    /* .colabora-section__card-title,
    .colabora-section__card-subtitle {
        font-size: 16px;
    } */

    .colabora-section__amount-btn {
        font-size: 16px;
        padding: 12px;
        min-height: 44px;
    }

    .colabora-section__donate-btn {
        font-size: 16px;
        padding: 14px 20px;
        min-height: 44px;
    }

    .colabora-section__circle {
        display: none;
    }
}

@media (max-width: 480px) {
    .colabora-section__amounts {
        grid-template-columns: repeat(3, 1fr);
    }

    .colabora-section__amount-btn {
        font-size: 14px;
        min-height: 40px;
        min-height: 40px;
        padding: 8px 8px;
    }

    .colabora-section__custom-input{
        max-width: 100%;
    }
}

/* Full width alignment */
.menudos-colabora-section.alignfull {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.menudos-colabora-section.alignwide {
    width: calc(100% + 100px);
    max-width: 1400px;
    margin-left: -50px;
    margin-right: -50px;
}

/* Editor Styles */
.is-admin .menudos-colabora-section,
.block-editor-block-list__block .menudos-colabora-section {
    min-height: 400px;
}

/* Editor input styles - override WP defaults */
.block-editor-block-list__block .colabora-section__custom-input,
.is-admin .colabora-section__custom-input {
    width: 100%;
    max-width: 30%;
    padding: 8px 16px;
    font-family: var(--wp--preset--font-family--inter, 'Inter', sans-serif);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.21;
    color: var(--wp--preset--color--text-dark, #333333);
    background-color: var(--wp--preset--color--light-gray, #F4F4F4);
    border: none;
    border-radius: 16px;
    outline: none;
    box-shadow: none;
}

.block-editor-block-list__block .colabora-section__amount-btn,
.is-admin .colabora-section__amount-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    height: 48px;
    font-family: var(--wp--preset--font-family--inter, 'Inter', sans-serif);
    font-size: 18px;
    font-weight: 700;
    color: var(--wp--preset--color--text-dark, #333333);
    background-color: var(--wp--preset--color--white, #FFFFFF);
    border: 1px solid var(--wp--preset--color--secondary, #787878);
    border-radius: 24px;
}

/* ==========================================================================
   Donation Modal
   ========================================================================== */

.colabora-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.colabora-modal.is-open {
    display: flex;
}

.colabora-modal.is-visible {
    opacity: 1;
}

.colabora-modal__backdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.colabora-modal__container {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    background-color: var(--wp--preset--color--white, #FFFFFF);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.colabora-modal.is-visible .colabora-modal__container {
    transform: scale(1) translateY(0);
}

.colabora-modal__close {
    position: absolute;
    top: 20px;
    right: 16px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--wp--preset--color--text-medium, #4F4F4F);
    transition: background-color 0.2s ease, color 0.2s ease;
    z-index: 3;
}

.colabora-modal__close:hover {
    background-color: var(--wp--preset--color--light-gray, #F4F4F4);
    color: var(--wp--preset--color--text-dark, #222222);
}

.colabora-modal__close:focus-visible {
    outline: 2px solid var(--wp--preset--color--primary, #C8102E);
    outline-offset: 2px;
}

.colabora-modal__content {
    padding: 0 32px;
    overflow-y: auto;
    flex: 1;
}

.colabora-modal__title {
    position: sticky;
    top: 0;
    z-index: 2;
    margin: 0 -32px;
    padding: 20px 64px 16px 32px;
    background-color: var(--wp--preset--color--white, #FFFFFF);
    font-family: var(--wp--preset--font-family--inter, 'Inter', sans-serif);
    font-size: 20px;
    font-weight: 700;
    line-height: 40px;
    color: var(--wp--preset--color--text-dark, #222222);
}

/* Form wrapper - contains the WP Simple Pay shortcode output */
.colabora-modal__form-wrapper {
    width: 100%;
    padding-bottom: 16px;
}

/* SimplePay checkout button - sticky at bottom of modal scroll */
.colabora-modal__form-wrapper .simpay-checkout-btn-container {
    position: sticky;
    bottom: 0;
    z-index: 2;
    background-color: var(--wp--preset--color--white, #FFFFFF);
    padding-top: 12px;
    padding-bottom: 12px;
}

/* Placeholder when no shortcode is configured */
.colabora-modal__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    padding: 24px;
    background-color: var(--wp--preset--color--light-gray, #FAFAFA);
    border: 2px dashed var(--wp--preset--color--border, #E5E5E5);
    border-radius: 12px;
}

.colabora-modal__placeholder p {
    margin: 0;
    font-family: var(--wp--preset--font-family--inter, 'Inter', sans-serif);
    font-size: 14px;
    color: var(--wp--preset--color--text-light, #787878);
    text-align: center;
}

/* Body scroll lock when modal is open */
body.colabora-modal-open {
    overflow: hidden;
}

/* MODAL LANDING PAGE DONAR */
.colabora-modal__content .simpay-form-control h3,
.colabora-modal__content .simpay-embedded-heading h3,
.colabora-modal__content .simpay-form-control h2 {
	font-weight: 700;
	font-style: bold;
	font-size: 16px;
	color: #333;
    margin-top: 24px !important; 
    font-family: var(--wp--preset--font-family--inter, 'Inter', sans-serif);
}

.colabora-modal__content .simpay-custom_amount-label label,
.colabora-modal__content .simpay-customer_name-label label,
.colabora-modal__content .simpay-text-label label,
.colabora-modal__content .simpay-email-label label{
	font-weight: 500;
	font-style: medium;
	font-size: 16px;
	color: rgba(79, 79, 79, 1);
}

.colabora-modal__content ul.simpay-multi-plan-buttons-group {
	display: flex !important;
	flex-wrap: wrap;
	gap: 10px;
	list-style: none !important;
	padding: 0 !important;
	margin: 0 0 15px 0 !important;
}

.colabora-modal__content ul.simpay-multi-plan-buttons-group li {
	flex: 1;
	margin: 0 !important
}

.colabora-modal__content .simpay-multi-plan-buttons-group input[type="radio"] {
	position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.colabora-modal__content .simpay-multi-plan-buttons-group label {
	display: block;
	width: 100%;
	text-align: center;
	padding: 8.5px 35.17px;
	background-color: #ffffff;
	border: 1px solid rgba(51, 51, 51, 1);
	border-radius: 50px;
	color: #333;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.colabora-modal__content .simpay-multi-plan-buttons-group input[type=radio]:checked+label {
	box-shadow: none !important;
}

.colabora-modal__content .simpay-multi-plan-buttons-group label:hover {
	border-color: var(--wp--preset--color--primary, #D50032);
	color: var(--wp--preset--color--white, #FFFFFF);
	background-color: var(--wp--preset--color--primary, #D50032);
}

.colabora-modal__content .simpay-multi-plan-buttons-group input[type="radio"]:checked + label {
    background-color: var(--wp--preset--color--primary, #D50032) !important;
    border-color: var(--wp--preset--color--primary, #D50032) !important;
    color: var(--wp--preset--color--white, #FFFFFF) !important;
}

.colabora-modal__content .simpay-custom-amount-wrap,
.colabora-modal__content .simpay-customer-name-wrap,
.colabora-modal__content .simpay-text-wrap,
.colabora-modal__content .simpay-email-wrap {
	background-color: #f2f2f2;
	border: 1px solid transparent;
	border-radius: 1rem;
	padding: 1.5px 16px;
	display: flex;
	align-items: center;
	transition: all 0.3s ease;
}

.colabora-modal__content .simpay-currency-symbol {
	color: rgba(120, 120, 120, 1);
	font-size: 16px;
	border: none !important;
	box-shadow: none !important;
	margin-right: -15px
}

.colabora-modal__content input.simpay-custom-amount-input,
.colabora-modal__content .simpay-customer-name,
.colabora-modal__content .simpay-customer-name,
.colabora-modal__content .simpay-text-wrap input,
.colabora-modal__content .simpay-email {
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	height: auto !important;
	padding: 0 !important;
	margin: 0px !important;
	font-size: 16px !important;
	color: rgba(120, 120, 120, 1) !important;
	width: 100%;
	outline: none !important;
}

.colabora-modal__content .simpay-btn {
	background: var(--wp--preset--color--primary, #D50032) !important;
	border-radius: 50px !important;
}



/* Style modal success */


#custom-success-modal .modal-card-success{ 
    background: var(--wp--preset--color--white, #FFFFFF);
    width: 90%;
    max-width: 360px;
    border-radius: 24px;
    padding: 24px;
    position: relative;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    text-align: center;
}

/* Encabezado (Dona Ahora y X) */
#custom-success-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

#custom-success-modal .modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
    font-weight: 700;
}

#custom-success-modal .close-x {
    cursor: pointer;
    background: none;
    border: none;
    font-size: 24px;
    color: #555;
}

/* Icono de Check Azul */
#custom-success-modal .icon-container {
    margin: 33px auto 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Texto de Pago Finalizado */
#custom-success-modal h2 {
    color: #333;
    margin: 10px 0 40px 0;
    font-family: var(--wp--preset--font-family--inter, 'Inter', sans-serif);
    font-size: 16px;
    font-style: normal;
    font-weight: 700;
}

/* Botón Rojo "Cerrar" */
#custom-success-modal .btn-cerrar {
    width: 100%;
    background-color: var(--wp--preset--color--primary, #D50032); 
    font-family: var(--wp--preset--font-family--inter, 'Inter', sans-serif);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s ease;
    padding: 9px 1rem;
}

/* Modal Responsive */
@media (max-width: 768px) {
    .colabora-modal {
        padding: 16px;
        align-items: flex-end;
    }

    .colabora-modal__container {
        max-width: 100%;
        border-radius: 24px 24px 0 0;
        transform: translateY(100%);
    }

    .colabora-modal.is-visible .colabora-modal__container {
        transform: translateY(0);
    }

    .colabora-modal__content {
        padding: 0 24px;
    }

    .colabora-modal__title {
        font-size: 18px;
        margin: 0 -24px;
        padding: 20px 56px 14px 24px;
    }
}

@media (max-width: 480px) {
    .colabora-modal__content {
        padding: 0 20px;
    }

    .colabora-modal__close {
        top: 16px;
        right: 12px;
        width: 36px;
        height: 36px;
    }

    .colabora-modal__title {
        margin: 0 -20px;
        padding: 16px 48px 12px 20px;
        line-height: 36px;
    }
}
