/* Gifts Page Specific Styles */

/* Gifts Hero */
.gifts-hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, var(--lilac-light) 0%, rgba(209, 196, 233, 0.2) 100%);
}

.gifts-hero-content h1 {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 400;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.gifts-hero-content p {
    font-size: 1.3rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.gifts-hero-content .subtitle {
    font-size: 1rem;
    color: var(--lilac-dark);
    font-style: italic;
}

/* Gifts Section */
.gifts-section {
    padding: 100px 0;
    background: var(--white);
}

.gifts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

/* Gift Card */
.gift-card {
    background: var(--white);
    border: 1px solid var(--lilac-light);
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-light);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.gift-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-medium);
    border-color: var(--lilac-dark);
}

.gift-emoji {
    font-size: 3.5rem;
    margin-bottom: 20px;
    display: inline-block;
}

.gift-card h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.gift-price {
    font-size: 1.8rem;
    color: var(--lilac-dark);
    font-weight: 700;
    margin-bottom: 15px;
}

.gift-description {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 25px;
    flex-grow: 1;
}

/* Gift Quota */
.gift-quota {
    margin-top: 15px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.quota-available {
    color: var(--lilac-dark);
    font-weight: 600;
}

.quota-reserved {
    color: var(--text-muted);
    font-style: italic;
}

/* Gift Progress */
.gift-progress {
    margin-top: 15px;
    margin-bottom: 20px;
    text-align: left;
}

.progress-bar-container {
    width: 100%;
    background-color: var(--lilac-light);
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-bar {
    height: 100%;
    background-color: var(--lilac-dark);
    border-radius: 10px;
    transition: width 0.5s ease-in-out;
}

.progress-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* PIX Future Notice */
.pix-future-notice {
    text-align: center;
    margin-top: 80px;
    padding: 40px;
    background: linear-gradient(45deg, var(--lilac-light) 0%, var(--beige) 100%);
    border-radius: 20px;
    box-shadow: var(--shadow-light);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pix-future-notice i {
    color: var(--lilac-dark);
    width: 50px;
    height: 50px;
    margin-bottom: 20px;
}

.pix-future-notice p {
    font-size: 1.2rem;
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 10px;
}

.pix-future-notice .small-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Contribute Button */
.btn-contribute {
    padding: 12px 30px;
    background: var(--lilac-dark);
    color: var(--white);
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.btn-contribute:hover {
    background: #7e57c2;
    transform: scale(1.05);
}

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

/* Free Gift Card */
.gift-card-free {
    background: linear-gradient(135deg, var(--lilac-light) 0%, rgba(209, 196, 233, 0.1) 100%);
    border: 2px dashed var(--lilac-dark);
}

.custom-gift-input {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.custom-gift-input input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid var(--lilac-dark);
    border-radius: 25px;
    font-family: inherit;
    font-size: 0.95rem;
    text-align: center;
}

.custom-gift-input input:focus {
    outline: none;
    border-color: #7e57c2;
    box-shadow: 0 0 0 3px rgba(149, 117, 205, 0.1);
}

.custom-gift-input .btn-contribute {
    padding: 12px 25px;
    white-space: nowrap;
}

/* Thank You Section */
.thank-you-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--lilac-light) 0%, var(--white) 100%);
    text-align: center;
}

.thank-you-content {
    max-width: 600px;
    margin: 0 auto;
}

.thank-you-content i {
    color: var(--lilac-dark);
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.thank-you-content h2 {
    font-family: var(--font-serif);
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.thank-you-content p {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.8;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--white);
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideUp 0.3s ease;
}

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

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.3s;
}

.modal-close:hover {
    color: var(--text-dark);
}

.modal-content h2 {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.modal-content p {
    color: var(--text-muted);
    margin-bottom: 30px;
    line-height: 1.6;
}

#walletContainer {
    margin: 30px 0;
    min-height: 100px;
}

.modal-footer {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 20px;
    text-align: center;
}

/* Success Page */
.success-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    overflow: hidden;
}

.success-page.hidden {
    display: none;
}

.success-page canvas {
    position: absolute;
    top: 0;
    left: 0;
}

.success-content {
    position: relative;
    z-index: 10;
    text-align: center;
    animation: zoomIn 0.5s ease;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.success-icon {
    margin-bottom: 30px;
}

.success-icon i {
    color: #4caf50;
    width: 80px;
    height: 80px;
    animation: scaleIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.success-content h1 {
    font-family: var(--font-serif);
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.success-content p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.success-message {
    font-size: 1rem;
    margin-bottom: 40px;
}

.success-content .btn-primary {
    display: inline-block;
}

/* Checkout Options (dentro do modal) */
.checkout-options {
    text-align: center;
    padding: 10px 0;
}

.checkout-info {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 20px !important;
}

.btn-checkout-redirect {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 25px;
    background: linear-gradient(135deg, #009ee3, #0070ba);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.btn-checkout-redirect:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 158, 227, 0.3);
}

.checkout-icon {
    font-size: 2rem;
}

.checkout-text {
    text-align: left;
}

.checkout-text strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 3px;
}

.checkout-text small {
    font-size: 0.85rem;
    opacity: 0.9;
}

.checkout-secure {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 15px !important;
}

/* Modal Loading */
.modal-loading {
    text-align: center;
    padding: 30px 0;
}

.modal-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--lilac-light);
    border-top-color: var(--lilac-dark);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 15px;
}

.modal-loading p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Modal Error */
.modal-error {
    text-align: center;
    padding: 20px 0;
}

.modal-error-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.modal-error-text {
    color: #c62828;
    font-size: 0.95rem;
    margin-bottom: 20px !important;
}

.btn-modal-retry {
    padding: 10px 25px;
    background: var(--lilac-dark);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.btn-modal-retry:hover {
    background: #7e57c2;
}

/* Input Error */
.input-error {
    display: block;
    color: #e53935;
    font-size: 0.8rem;
    margin-top: 5px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Payment Status Message */
.payment-status-message {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5000;
    padding: 20px;
}

.payment-status-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 450px;
    width: 100%;
    text-align: center;
    animation: slideUp 0.3s ease;
}

.payment-status-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.payment-status-content h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.payment-status-content p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .gifts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .gift-card {
        padding: 30px 20px;
    }

    .gift-emoji {
        font-size: 2.5rem;
    }

    .gifts-hero-content h1 {
        font-size: 2rem;
    }

    .modal-content {
        padding: 30px 20px;
    }

    .custom-gift-input {
        flex-direction: column;
    }

    .custom-gift-input input,
    .custom-gift-input .btn-contribute {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .gifts-hero {
        min-height: 50vh;
        padding: 40px 20px;
    }

    .gift-card {
        padding: 25px 15px;
    }

    .thank-you-section {
        padding: 60px 0;
    }

    .success-content h1 {
        font-size: 2rem;
    }
}

.custom-gift-input {
    position: relative;
    flex-wrap: wrap;
}

.input-error {
    width: 100%;
    display: block;
    margin-top: 0.65rem;
    padding: 0.65rem 0.8rem;
    border-radius: 12px;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: #be123c;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    animation: inputErrorFadeIn 0.2s ease;
}

.input-has-error {
    border-color: #e11d48 !important;
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.12) !important;
}

@keyframes inputErrorFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.contribution-identification {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    text-align: left;
}

.identification-intro {
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 0.4rem;
}

.contribution-identification label {
    font-weight: 600;
    color: var(--text-dark);
}

.contribution-identification label span {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.85rem;
}

.contribution-identification input,
.contribution-identification textarea {
    border: 1px solid rgba(149, 117, 205, 0.3);
    border-radius: 12px;
    padding: 0.85rem;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    outline: none;
}

.contribution-identification input:focus,
.contribution-identification textarea:focus {
    border-color: var(--lilac-dark);
    box-shadow: 0 0 0 3px rgba(149, 117, 205, 0.12);
}

.btn-continue-payment,
.btn-anonymous-payment {
    width: 100%;
    margin-top: 0.3rem;
}

.pix-direct-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.25rem;
    align-items: center;
    text-align: left;
    width: 100%;
}

.pix-direct-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    background: var(--lilac-light);
    color: var(--lilac-dark);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pix-direct-info h3 {
    margin: 0 0 0.35rem;
    color: var(--text-dark);
    font-family: var(--font-serif);
}

.pix-direct-info p {
    margin: 0 0 0.5rem;
    color: var(--text-muted);
}

.pix-beneficiary {
    font-size: 0.9rem;
    font-weight: 600;
}

.pix-key-box {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 0.65rem;
}

.pix-key-box span {
    padding: 0.65rem 0.8rem;
    border-radius: 999px;
    background: #fff;
    border: 1px dashed var(--lilac-dark);
    color: var(--text-dark);
    font-size: 0.9rem;
    word-break: break-all;
}

.btn-copy-pix {
    border: none;
    border-radius: 999px;
    padding: 0.65rem 1rem;
    background: var(--lilac-dark);
    color: white;
    font-weight: 700;
    cursor: pointer;
}

.pix-qr-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
}

.pix-qr-code {
    width: 140px;
    height: 140px;
    border-radius: 14px;
    background: #fff;
    padding: 0.45rem;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.pix-qr-wrapper small {
    color: var(--text-muted);
    font-size: 0.8rem;
}

@media (max-width: 768px) {
    .pix-direct-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .pix-direct-icon {
        margin: 0 auto;
    }

    .pix-key-box {
        justify-content: center;
    }
}

.pix-copy-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.btn-copy-pix-secondary {
    background: transparent;
    color: var(--lilac-dark);
    border: 1px solid var(--lilac-dark);
}

.payment-choice-actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 0.5rem;
}

.btn-pix-payment {
    width: 100%;
}

.btn-link-payment {
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    text-decoration: underline;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.modal-pix-payment {
    text-align: center;
}

.modal-pix-payment h3 {
    font-family: var(--font-serif);
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.modal-pix-description,
.modal-pix-note {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.modal-pix-summary {
    margin: 1rem 0;
    padding: 0.9rem;
    border-radius: 14px;
    background: var(--lilac-light);
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.modal-pix-summary span {
    color: var(--lilac-dark);
    font-weight: 800;
    font-size: 1.25rem;
}

.modal-pix-qr-area {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
}

.modal-pix-qr {
    width: 180px;
    height: 180px;
    border-radius: 16px;
    background: #fff;
    padding: 0.5rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.btn-copy-modal-pix,
.btn-back-payment-options {
    width: 100%;
    margin-top: 0.5rem;
}

/* ============================================================
   HOTFIX MOBILE - PIX direto público
   Corrige alinhamento do botão copiar chave e evita estouro lateral
   ============================================================ */

.pix-direct-card {
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1.4rem;
    text-align: left;
}

.pix-direct-info {
    min-width: 0;
}

.pix-direct-info h3,
.pix-direct-info p,
.pix-beneficiary {
    overflow-wrap: anywhere;
    word-break: normal;
}

.pix-key-box {
    width: 100%;
    max-width: 100%;
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(149, 117, 205, 0.22);
    overflow: hidden;
}

.pix-key-box span {
    display: block;
    max-width: 100%;
    font-family: monospace;
    font-size: 0.92rem;
    line-height: 1.4;
    color: var(--text-dark);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.pix-copy-actions {
    width: 100%;
    margin-top: 0.85rem;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.btn-copy-pix,
.btn-copy-pix-secondary {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.78rem 1.35rem;
    border-radius: 999px;
    border: none;
    background: var(--lilac-dark);
    color: var(--white);
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    line-height: 1;
    white-space: nowrap;
    transition: 0.2s ease;
}

.btn-copy-pix:hover,
.btn-copy-pix-secondary:hover {
    background: #7e57c2;
    transform: translateY(-1px);
}

.pix-qr-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-width: 170px;
    text-align: center;
}

.pix-qr-code {
    width: 160px;
    height: 160px;
    max-width: 100%;
    border-radius: 14px;
    background: #ffffff;
    padding: 0.45rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.pix-qr-wrapper small {
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.3;
}

@media (max-width: 768px) {
    .pix-future-notice {
        margin-top: 48px;
        padding: 24px 16px;
        border-radius: 18px;
    }

    .pix-direct-card {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 1.15rem;
        text-align: center;
    }

    .pix-direct-icon {
        align-self: center;
    }

    .pix-direct-info {
        width: 100%;
    }

    .pix-direct-info h3 {
        font-size: 1.25rem;
        line-height: 1.25;
    }

    .pix-direct-info p {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .pix-beneficiary {
        font-size: 0.9rem !important;
    }

    .pix-key-box {
        margin-top: 0.85rem;
        padding: 0.8rem;
        text-align: center;
    }

    .pix-key-box span {
        font-size: 0.86rem;
    }

    .pix-copy-actions {
        justify-content: center;
        margin-top: 0.75rem;
    }

    .btn-copy-pix,
    .btn-copy-pix-secondary {
        width: 100%;
        max-width: 280px;
        min-height: 46px;
        padding: 0.85rem 1rem;
    }

    .pix-qr-wrapper {
        width: 100%;
        min-width: 0;
        order: 3;
    }

    .pix-qr-code {
        width: 150px;
        height: 150px;
    }
}

@media (max-width: 420px) {
    .pix-future-notice {
        padding: 22px 12px;
    }

    .pix-key-box span {
        font-size: 0.8rem;
    }

    .btn-copy-pix,
    .btn-copy-pix-secondary {
        max-width: 100%;
    }

    .pix-qr-code {
        width: 138px;
        height: 138px;
    }
}