/* Namespace: gr_mailing_ */

/* =====================
   FORMULARIO WRAPPER
   ===================== */
.formulario .gr_mailing_wrapper {
    max-width: 500px;
    margin: 20px auto;
    position: relative;
    z-index: 99;
    opacity: 0;
    animation: formularioEntradaIzq 0.6s ease-out forwards;
    height: 0;
    top: 0;
}

.formulario .gr_mailing_form {
    padding: 60px;
    border-radius: 55px;
    display: block !important;
    position: relative;
    right: 18rem;
    height: 720px;
}

.formulario .gr_mailing_form_variable {
    padding: 60px;
    border-radius: 55px;
    display: block !important;
    top: -817px;
    position: relative;
    right: 137%;
    height: 720px;
}

.formulario .gr_mailing_group {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.formulario .gr_mailing_label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #333 !important;
    font-size: 14px;
}

/* =====================
   INPUTS & SELECTS
   ===================== */
.formulario .gr_mailing_input,
.formulario .gr_mailing_select {
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    border: 1px solid #50637d !important;
    border-radius: 6px;
    font-size: 1rem;
    background-color: transparent;
    color: #fff;
    margin-top: 20px !important;
}

.formulario .gr_mailing_input:focus,
.formulario .gr_mailing_select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.15);
}

/* =====================
   BOTÓN
   ===================== */
.formulario .gr_mailing_button {
    width: 100%;
    background-color: #e78c2d;
    color: #1f2937 !important;
    padding: 18px;
    border: none;
    cursor: pointer;
    font-size: 18px;
    transition: transform 0.2s ease, background 0.3s ease;
    border-radius: 50px;
    height: 57px;
    margin-top: 20px;
}

.formulario .gr_mailing_button:hover {
    transform: translateY(-1px);
    color: #fff;
}

.formulario .gr_mailing_button:active {
    transform: translateY(0);
}

.formulario button,
.gr_modal--formulario button {
    cursor: pointer;
}

/* =====================
   ALERTAS INLINE DEL FORM
   ===================== */
.formulario .gr_mailing_alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

.formulario .gr_mailing_alert_success {
    background-color: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.formulario .gr_mailing_alert_danger {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* =====================
   HINT
   ===================== */
.formulario .gr_hint-wrapper {
    position: relative;
}

.formulario .gr_hint {
    position: absolute;
    top: 62%;
    right: -1px;
    transform: translateY(100%) translateX(-20%);
    background: #212830;
    color: #f07b02;
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
}

.formulario .gr_hint-wrapper:focus-within .gr_hint {
    animation: formularioHintAnim 2.8s ease forwards;
}

/* =====================
   MODAL
   ===================== */
.gr_modal--formulario {
    position: fixed;
    inset: 0;
    z-index: 1000;
    pointer-events: none;
}

.gr_modal--formulario .gr_modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gr_modal--formulario .gr_modal-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 400px;
    max-width: 90%;
    height: 100%;
    background: rgb(33 40 48);
    color: #fff;
    padding: 30px;
    transform: translateX(100%);
    transition: transform 0.4s ease;
}

.gr_modal--formulario:target {
    pointer-events: auto;
}

.gr_modal--formulario:target .gr_modal-overlay {
    opacity: 1;
}

.gr_modal--formulario:target .gr_modal-content {
    transform: translateX(0);
}

.gr_modal--formulario #copyMessage {
    display: none;
    color: green;
    margin-left: 10px;
    font-weight: bold;
}

/* =====================
   PERFIL (MODAL)
   ===================== */
.gr_modal--formulario .profile-container {
    flex-shrink: 0;
    margin-top: 16px;
}

.gr_modal--formulario .profile-img-wrapper {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 8px solid #212830;
    overflow: hidden;
}

/* =====================
   ALERTAS FLOTANTES
   ===================== */
.gr_alert-container {
    position: fixed;
    top: 50px;
    right: 20px;
    z-index: 10000;
    width: 90%;
    max-width: 400px;
}

.gr_alert {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    background: white;
    animation: slideInRight 0.5s ease-out forwards;
    transition: opacity 0.6s ease, transform 0.6s ease;
    opacity: 1;
}

.gr_alert p {
    margin: 0;
    flex-grow: 1;
    font-weight: 500;
}

.gr_alert-icon {
    margin-right: 12px;
    font-weight: bold;
    font-size: 1.2rem;
}

.gr_alert-close {
    background: transparent;
    border: none;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: inherit;
    padding-left: 12px;
    opacity: 0.55;
    transition: opacity 0.2s;
}

.gr_alert-close:hover {
    opacity: 1;
}

.gr_alert-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 6px solid #28a745;
}

.gr_alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 6px solid #dc3545;
}

.gr_alert.gr_fade-out {
    opacity: 0;
    transform: translateX(100%);
    pointer-events: none;
}

/* =====================
   PRIVACY BOX
   ===================== */
.form-privacy-box {
    margin-top: 20px;
    padding: 24px;
    border-radius: 40px;
    background: #ff8614;
    color: #141c2b;
    border: 1px solid rgba(255, 134, 20, 0.3);
    width: 15%;
    left: clamp(32rem, calc(43.6364vw - 20.3636rem), 50rem);
    position: relative;
}

.form-privacy-box__label {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #141c2b;
}

.form-privacy-box__text {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.55;
    color: #141c2b;
}

.form-privacy-box__text:last-child {
    margin-bottom: 0;
}

.form-privacy-box__link {
    color: #141c2b;
    font-weight: 900;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.form-privacy-box__link:hover {
    opacity: 0.75;
}

/* =====================
   ANIMACIONES
   ===================== */
@keyframes formularioEntradaIzq {
    0% {
        opacity: 0;
        transform: translateX(-50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes formularioHintAnim {
    0% {
        opacity: 0;
        transform: translateY(-50%) translateX(200%);
    }
    20% {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
    70% {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-50%) translateX(-200%);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* =====================
   MEDIA QUERIES
   ===================== */
@media (max-width: 768px) {
    .formulario .gr_mailing_form,
    .formulario .gr_mailing_form_variable {
        padding: 18px;
        border-radius: 44px;
        display: block !important;
        position: unset;
        height: 720px;
        margin: 16px auto;
    }

    .form-privacy-box {
        left: 50%;
        transform: translateX(-50%);
        top: 45rem;
        width: 92%;
    }
}

@media (max-width: 500px) {
    .formulario .gr_mailing_wrapper {
        max-width: 94%;
    }

    .formulario {
        margin-bottom: 767px;
    }
}

@media (min-width: 769px) and (max-width: 1399px) {
    .form-privacy-box {
        width: 35%;
        left: 50%;
        transform: translateX(-50%);
    }
}