/* Estilos para o sistema de cupons */

/* Modal de cupom */
#coupon-success-modal {
    z-index: 1001; /* Acima do modal principal */
}

#coupon-success-modal .modal-content {
    max-width: 700px;
    text-align: center;
    animation: slideInUp 0.3s ease-out;
}

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

/* Código do cupom */
#coupon-code {
    font-family: 'Courier New', monospace;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 2px;
    background: rgba(255, 255, 255, 0.2);
    padding: 16px;
    border-radius: 12px;
    display: inline-block;
    min-width: 200px;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

/* Botões do cupom */
#copy-coupon-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}

#copy-coupon-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

#copy-coupon-btn:active {
    transform: translateY(0);
}

/* Botões de compartilhamento */
#copy-share-btn {
    transition: all 0.3s ease;
}

#copy-share-btn:hover {
    background: #10b981;
    color: white;
    transform: translateY(-1px);
}

#whatsapp-share-btn {
    transition: all 0.3s ease;
}

#whatsapp-share-btn:hover {
    background: #25d366;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

/* Textarea de compartilhamento */
#share-text {
    font-family: inherit;
    line-height: 1.5;
    resize: vertical;
    min-height: 120px;
    transition: border-color 0.3s ease;
}

#share-text:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Input de URL */
#share-url {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

#share-url:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Seção de instruções */
#coupon-success-modal .instruction-section {
    background: #f8fafc;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 32px;
    text-align: left;
    border-left: 4px solid #10b981;
}

#coupon-success-modal .instruction-section h4 {
    color: var(--primary);
    margin-bottom: 16px;
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

#coupon-success-modal .instruction-section ol {
    margin: 0;
    padding-left: 20px;
    color: var(--text-secondary);
    line-height: 1.6;
}

#coupon-success-modal .instruction-section li {
    margin-bottom: 8px;
}

/* Seção de compartilhamento */
#coupon-success-modal .share-section {
    background: #f0fdf4;
    border: 2px solid #10b981;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 24px;
}

#coupon-success-modal .share-section h4 {
    color: #065f46;
    margin-bottom: 16px;
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Responsividade */
@media (max-width: 768px) {
    #coupon-success-modal .modal-content {
        margin: 20px;
        max-width: calc(100vw - 40px);
    }
    
    #coupon-code {
        font-size: 1.5rem;
        padding: 12px;
        min-width: 150px;
    }
    
    #coupon-success-modal .share-section {
        padding: 16px;
    }
    
    #share-text {
        min-height: 100px;
    }
    
    #coupon-success-modal .instruction-section {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    #coupon-code {
        font-size: 1.25rem;
        padding: 10px;
        min-width: 120px;
    }
    
    #coupon-success-modal h2 {
        font-size: 1.5rem;
    }
    
    #coupon-success-modal p {
        font-size: 1rem;
    }
}

/* Animações de feedback */
.coupon-feedback {
    animation: pulse 0.6s ease-in-out;
}

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

/* Estados de loading */
.coupon-loading {
    opacity: 0.7;
    pointer-events: none;
}

.coupon-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #10b981;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
